Skip to content

Commit

Permalink
Project customisations for Kano OS
Browse files Browse the repository at this point in the history
This single commit is always applied on top of the latest mirror
of rpi-chromium-mods and it contains all extras specific to Kano OS.
To view previous versions of this package, see Tags. Our changes
are only in packaging and Chromium's master_preferences file.
  • Loading branch information
radujipa authored and tombettany committed Aug 30, 2019
1 parent 5171ae5 commit b379ba7
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 7 deletions.
12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env groovy

@Library('kanolib')
import build_deb_pkg


def repo_name = 'rpi-chromium-mods'


stage ('Build') {
autobuild_repo_pkg "$repo_name"
}
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
# rpi-chromium-mods

This is our "fork" of Raspberry Pi's `rpi-chromium-mods` debian repository.

**Base Package Last Updated: `Kano OS v4.3.0`**
**Kano Customisations Last Updated: `Kano OS v4.3.2`**


## Updating rpi-chromium-mods

In Kano OS, we mirror Rasbian and Raspberry Pi debian sources. Therefore, when
we update the Raspberry Pi mirrors, we get a new version of the original
rpi-chromium-mods. This newer version will always be overshadowed by Kano's
`rpi-chromium-mods-kano`.

As such, in order to update the package, you'll simply need to unpack the newer
version of rpi-chromium-mods and add the files to this repository.


## Commit Conventions

From 5 April 2019, the contributions to this project will follow these rules:

- [Our single commit which adds everything on top of a default version]
- [Base version of rpi-chromium-mods]
- [Base version of rpi-chromium-mods]
- ...
- [Added .gitignore and README.md](https://github.com/KanoComputing/rpi-chromium-mods/commit/6160f147a9205ea9e40353967acdd3205db3cd30)
- [Reset project, start fresh](https://github.com/KanoComputing/rpi-chromium-mods/commit/8570389a27dd6a96eb61e500671351b809735b84)

This means that when a newer version of rpi-chromium-mods is added, the commit
will be added below our customisations and you'll have to update those changes.

When commiting a newer version of rpi-chromium-mods, do so **using the commit
message convention** exemplified in [7c715e74381082f0d5dba7b3719dfe4c2a568807](https://github.com/KanoComputing/rpi-chromium-mods/commit/7c715e74381082f0d5dba7b3719dfe4c2a568807).


## Example (macOS)

#### 1. Create a temporary workspace

```
mkdir -p /tmp/rpi-chromium-mods/
cd /tmp/rpi-chromium-mods/
```

#### 2. Download the new package locally

```
wget http://archive.raspberrypi.org/debian/pool/ui/r/rpi-chromium-mods/rpi-chromium-mods_20190103_armhf.deb
```

#### 3. Unpack the debian package

```
ar x rpi-chromium-mods_20190103_armhf.deb
tar -zxvf *.tar.gz
tar -xvf *.tar.xz
cd usr/share/doc/rpi-chromium-mods/ && gunzip *.gz && cd ../../../..
rm *.deb *.tar.gz *.tar.xz
```

#### 4. In the repository, revert the customisations commit and stash it

```
cd ~/Kano/rpi-chromium-mods/
git checkout -b update
git reset HEAD~1
git stash
```

#### 5. Copy all the existing and new files from the new rpi-chromium-mods

```
cp /tmp/rpi-chromium-mods/usr/lib/chromium-browser/* armhf/
cp /tmp/rpi-chromium-mods/etc/chromium-browser/customizations/* armhf/
cp /tmp/rpi-chromium-mods/{config,control,postinst,postrm,templates} debian/
cp /tmp/rpi-chromium-mods/usr/share/doc/rpi-chromium-mods/* debian/
```

There may other files, so pay attention here.

#### 6. Commit the newer version of rpi-chromium-mods

```
git commit
```

See `Commit Conventions` for what to use as the commit message.

#### 7. Apply Kano customisations on top

```
git stash pop
```

#### 8. Solve any issues there may be with the new version

#### 9. Commit the new Kano customisation single commit on top

```
git add *
git commit
```

Use the same commit message (or update as necessary):

```
Project customisations for Kano OS
This single commit is always applied on top of the latest mirror
of rpi-chromium-mods and it contains all extras specific to Kano OS.
To view previous versions of this package, see Tags. Our changes
are only in packaging and Chromium's master_preferences file.
```

#### 10. Update this README with the version of the OS this is for

#### 11. Push your changes

Because the history has been rewritten, you'll need to push with force.

```
git push origin update --force-with-lease
```
20 changes: 20 additions & 0 deletions armhf/master_preferences
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
{
"session": {
"restore_on_startup": 4,
"startup_urls": [
"http://world.kano.me/"
]
},
"distribution": {
"import_bookmarks": false,
"import_bookmarks_from_file": "/etc/chromium/initial_bookmarks.html",
"skip_first_run_ui": true,
"make_chrome_default": false,
"make_chrome_default_for_user": false,
"create_all_shortcuts": true,
"show_welcome_page": false
},
"bookmark_bar": {
"show_on_all_tabs": false
},
"alternate_error_pages": {
"enabled":false
},
Expand Down Expand Up @@ -45,6 +63,8 @@
}
},
"browser": {
"show_home_button":true,
"check_default_browser":false,
"custom_chrome_frame":false
},
"default_search_provider": {
Expand Down
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
19 changes: 12 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Package: rpi-chromium-mods
Version: 20190103
Architecture: armhf
Maintainer: Simon Long <[email protected]>
Installed-Size: 19667
Pre-Depends: dpkg (>= 1.15.7.2)
Depends: debconf, libc6 (>= 2.15), libgcc1 (>= 1:3.5), libstdc++6 (>= 4.9), debconf (>= 0.5) | debconf-2.0, chromium-browser (>= 65), chromium-codecs-ffmpeg-extra
Source: rpi-chromium-mods
Maintainer: Team Kano <[email protected]>
Section: unknown
Priority: optional
Standards-Version: 3.9.5
Homepage: <insert the upstream URL, if relevant>
Build-Depends: debhelper (>= 9)

Package: rpi-chromium-mods-kano
Architecture: armhf
Pre-Depends: dpkg (>= 1.15.7.2)
Depends: debconf, libc6 (>= 2.15), libgcc1 (>= 1:3.5), libstdc++6 (>= 4.9), debconf (>= 0.5) | debconf-2.0, chromium-browser (>= 65), chromium-codecs-ffmpeg-extra
Replaces: chromium-browser
Conflicts: rpi-chromium-mods
Provides: rpi-chromium-mods
Description: Raspberry Pi-specific mods to Chromium
Package contains Raspberry Pi-specific modifications to the
default Chromium browser install, including optimized settings
Expand Down
26 changes: 26 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/make -f

DEB_TARGET_ARCH ?= $(shell dpkg-architecture -qDEB_TARGET_ARCH)

override_dh_install:
ifeq ($(DEB_TARGET_ARCH),armhf)
mkdir -p debian/rpi-chromium-mods-kano/etc/chromium-browser/customizations/
cp -ax armhf/00-rpi-vars debian/rpi-chromium-mods-kano/etc/chromium-browser/customizations/
mkdir -p debian/rpi-chromium-mods-kano/usr/lib/chromium-browser/
cp -ax armhf/master_preferences debian/rpi-chromium-mods-kano/usr/lib/chromium-browser/
cp -ax armhf/libpepflashplayer.so debian/rpi-chromium-mods-kano/usr/lib/chromium-browser/
cp -ax armhf/flash_manifest.json debian/rpi-chromium-mods-kano/usr/lib/chromium-browser/
cp -ax armhf/Flash.htm debian/rpi-chromium-mods-kano/usr/lib/chromium-browser/
endif
dh_install

override_dh_strip:
dh_strip --exclude=pepflash

override_dh_shlibdeps:
ifeq ($(DEB_TARGET_ARCH),armhf)
dh_shlibdeps
endif

%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
1 change: 1 addition & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar-ignore=.git

0 comments on commit b379ba7

Please sign in to comment.