forked from Scout24/kiosk-browser
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to work with systemd, switch over to use debuild and release b…
…uilding Includes now Vagrantfile to test on Ubuntu and Debian.
- Loading branch information
Schlomo Schapiro
committed
May 22, 2017
1 parent
58690cd
commit b0608e0
Showing
25 changed files
with
153 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
build/ | ||
out/ | ||
*.log | ||
debian/kiosk-browser | ||
debian/*debhelper* | ||
debian/*substvars | ||
debian/files | ||
.deps | ||
.vagrant | ||
|
||
|
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,58 @@ | ||
.PHONY: info repo clean | ||
.PHONY: all build test install clean commit-release release deb repo | ||
PACKAGE=kiosk-browser | ||
SHELL=bash | ||
VERSION := $(shell git rev-list HEAD --count --no-merges) | ||
GIT_STATUS := $(shell git status --porcelain) | ||
|
||
*.deb: check_status clean | ||
rm -Rf build | ||
mkdir -p out | ||
cp -r src build | ||
cp -r DEBIAN build | ||
V=$$(git rev-list HEAD | wc -l) ; sed -i -e "s/Version:.*/Version: $$V/" build/DEBIAN/control | ||
git log | gzip -n9 >build/usr/share/doc/kiosk-browser/changelog.gz | ||
chmod -R g-w build | ||
chmod 0440 build/etc/sudoers.d/kiosk-browser | ||
/usr/sbin/visudo -c -f build/etc/sudoers.d/kiosk-browser | ||
fakeroot dpkg -b build out | ||
rm -Rf build | ||
lintian --suppress-tags postrm-contains-additional-updaterc.d-calls -i out/*.deb | ||
|
||
info: out/*.deb | ||
dpkg-deb -I out/*.deb | ||
dpkg-deb -c out/*.deb | ||
|
||
repo: out/*.deb | ||
../putinrepo.sh out/*.deb | ||
|
||
all: build | ||
|
||
build: | ||
@echo No build required | ||
|
||
commit-release: | ||
ifneq ($(GIT_STATUS),) | ||
$(error Please commit all changes before releasing. $(shell git status 1>&2)) | ||
endif | ||
gbp dch --full --release --new-version=$(VERSION) --distribution stable --auto --git-author --commit | ||
git push | ||
|
||
release: commit-release deb | ||
@latest_tag=$$(git describe --tags `git rev-list --tags --max-count=1`); \ | ||
comparison="$$latest_tag..HEAD"; \ | ||
if [ -z "$$latest_tag" ]; then comparison=""; fi; \ | ||
changelog=$$(git log $$comparison --oneline --no-merges --reverse); \ | ||
github-release schlomo/$(PACKAGE) v$(VERSION) "$$(git rev-parse --abbrev-ref HEAD)" "**Changelog**<br/>$$changelog" 'out/*.deb'; \ | ||
git pull | ||
dput ppa:sschapiro/ubuntu/ppa/xenial out/$(PACKAGE)_*_source.changes | ||
|
||
test: | ||
./runtests.sh | ||
|
||
install: | ||
install -m 0644 00-disable-inputs.conf -D -t $(DESTDIR)/usr/share/X11/xorg.conf.d | ||
install -m 0755 kiosk-browser-control -D -t $(DESTDIR)/usr/bin | ||
install -m 0644 openbox-rc.xml -D -t $(DESTDIR)/usr/share/$(PACKAGE) | ||
install -m 0644 sudoers -D $(DESTDIR)/etc/sudoers.d/$(PACKAGE) | ||
install -m 0644 XOsview -D -t $(DESTDIR)/usr/lib/X11/app-defaults | ||
install -m 0755 xsession.sh -D -t $(DESTDIR)/usr/share/$(PACKAGE) | ||
|
||
clean: | ||
rm -fr out build | ||
rm -Rf debian/$(PACKAGE) debian/*debhelper* debian/*substvars debian/files out/* | ||
|
||
deb: clean | ||
ifneq ($(MAKECMDGOALS), release) | ||
$(eval DEBUILD_ARGS := -us -uc) | ||
endif | ||
debuild $(DEBUILD_ARGS) -i -b --lintian-opts --profile debian | ||
debuild $(DEBUILD_ARGS) -i -S --lintian-opts --profile debian | ||
mkdir -p out | ||
mv ../$(PACKAGE)*.{xz,dsc,deb,build,changes} out/ | ||
cd out ; apt-ftparchive packages . >Packages | ||
dpkg -I out/*.deb | ||
dpkg -c out/*.deb | ||
|
||
repo: | ||
../putinrepo.sh out/*.deb | ||
|
||
check_status: | ||
@git diff-index --quiet HEAD -- || { echo ; git status -s ; echo -e "\nERROR: All changes must be comitted!\n" ; false ; } | ||
# vim: set ts=4 sw=4 tw=0 noet : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# workaround for vagrant-share error: vagrant plugin install vagrant-share --plugin-version 1.1.8 (from https://github.com/mitchellh/vagrant/issues/8519) | ||
# | ||
# you need the reload plugin: vagrant plugin install vagrant-reload | ||
# | ||
# then vagrant up | ||
# | ||
|
||
nodes = [ | ||
{ :hostname => 'debian', :box => 'debian/contrib-jessie64', :ram => 1024 }, | ||
{ :hostname => 'ubuntu', :box => 'ubuntu/xenial64', :ram => 1024 }, | ||
] | ||
|
||
$script = <<SCRIPT | ||
set -ex | ||
mount | grep vbox | ||
echo "deb [ trusted=yes ] copy:/packages /" >/etc/apt/sources.list.d/vagrant.list | ||
apt-get update | ||
apt-get -y install kiosk-browser | ||
SCRIPT | ||
|
||
Vagrant.configure(2) do |config| | ||
nodes.each do |node| | ||
config.vm.define node[:hostname] do |nodeconfig| | ||
nodeconfig.vm.box = node[:box] | ||
nodeconfig.vm.provider "virtualbox" | ||
nodeconfig.vm.hostname = node[:hostname] + ".box" | ||
# nodeconfig.ssh.insert_key = false | ||
nodeconfig.vm.synced_folder "./", "/vagrant", disabled: true | ||
nodeconfig.vm.synced_folder "out/", "/packages", owner: "root", group: "root", mount_options: ["dmode=777,fmode=666"] | ||
nodeconfig.vm.synced_folder ".deps/apt_archives/", "/var/cache/apt/archives/", create: true, owner: "root", group: "root", mount_options: ["dmode=775,fmode=664"] | ||
nodeconfig.vm.provider :virtualbox do |prov| | ||
prov.gui = true unless ENV['NO_GUI'] | ||
prov.customize ["modifyvm", :id, "--boot1", "DVD", "--boot2", "disk", | ||
"--boot3", "none", "--boot4", "none"] | ||
|
||
end | ||
nodeconfig.vm.provision "shell", inline: $script | ||
nodeconfig.vm.provision :reload | ||
end | ||
end | ||
end | ||
|
||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kiosk-browser (100) stable; urgency=medium | ||
|
||
* Resume development, see GitHub for older changes | ||
|
||
-- Schlomo Schapiro <[email protected]> Mon, 22 May 2017 10:10:10 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Source: kiosk-browser | ||
Maintainer: Schlomo Schapiro <[email protected]> | ||
Section: web | ||
Priority: optional | ||
Standards-Version: 3.9.8 | ||
Homepage: https://github.com/schlomo/kiosk-browser | ||
Build-Depends: debhelper (>= 9), git-buildpackage, libxml2-utils, sudo, bash (>= 4) | ||
|
||
Package: kiosk-browser | ||
Architecture: all | ||
Pre-Depends: nodm | ||
Depends: ${misc:Depends}, xserver-xorg, chromium | chromium-browser, epiphany-browser, uzbl, x11-xserver-utils, xdotool, x11-apps, sudo, imagemagick, debconf, xtightvncviewer, xosd-bin, xosview, openbox | ||
Description: Web Browser for non-interactive use like a web kiosk | ||
Setup system to work as a kiosk browser, showing only a full-screen browser. | ||
. | ||
Configuration options in /etc/default/kiosk-browser | ||
KIOSK_BROWSER_START_PAGE sets the start page | ||
Also add your own customization to that file, e.g. xrandr calls. | ||
. | ||
See project homepage for full list of config options. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kiosk-browser: binary-without-manpage usr/bin/kiosk-browser-control | ||
kiosk-browser: postrm-contains-additional-updaterc.d-calls etc/init.d/nodm |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/make -f | ||
%: | ||
dh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (native) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
function die() { echo 1>&2 ERROR: "$@" ; exit 1 ; } | ||
|
||
for s in xsession.sh kiosk-browser-control ; do | ||
bash -n $s || die "$s syntax error" | ||
done | ||
|
||
visudo -c -s -f sudoers || die "sudoers syntax error" | ||
|
||
xmllint -noout openbox-rc.xml || die "openbox-rc.xml syntax error" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters