From fa19cc9573aac19cfbf43364d4b5660c9ab645bc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 24 Feb 2014 00:25:29 +0100 Subject: autogenerate makefile for vendor system It can be useful to have a whole makefile available for vendor setup, but by providing a basic one we can deal with the simple cases more easily (and changes to the system are presumably easier). --- vendor/debian/makefile | 17 ----------------- vendor/debian/sources.list.in | 8 ++++---- vendor/getinfo | 20 ++++++++++++-------- vendor/makefile | 38 ++++++++++++++++++++++++-------------- vendor/raspbian/makefile | 16 ---------------- vendor/steamos/apt-vendor.ent | 2 +- vendor/steamos/makefile | 17 ----------------- vendor/steamos/sources.list.in | 4 ++-- vendor/tanglu/apt-vendor.ent | 1 + vendor/tanglu/makefile | 16 ---------------- vendor/tanglu/sources.list.in | 8 ++++---- vendor/ubuntu/makefile | 16 ---------------- vendor/vendor.makefile | 21 +++++++++++++++++++++ 13 files changed, 69 insertions(+), 115 deletions(-) delete mode 100644 vendor/debian/makefile delete mode 100644 vendor/raspbian/makefile delete mode 100644 vendor/steamos/makefile delete mode 100644 vendor/tanglu/makefile delete mode 100644 vendor/ubuntu/makefile create mode 100644 vendor/vendor.makefile (limited to 'vendor') diff --git a/vendor/debian/makefile b/vendor/debian/makefile deleted file mode 100644 index 25bc0350c..000000000 --- a/vendor/debian/makefile +++ /dev/null @@ -1,17 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=vendor/debian - -# Bring in the default rules -include ../../buildlib/defaults.mak - -doc binary manpages: sources.list - -sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&stable-codename;#$(shell ../getinfo debian-stable-codename)#g' $< > $@ - -clean: clean/sources.list - -clean/sources.list: - rm -f sources.list - diff --git a/vendor/debian/sources.list.in b/vendor/debian/sources.list.in index 745e32cbe..2e430296a 100644 --- a/vendor/debian/sources.list.in +++ b/vendor/debian/sources.list.in @@ -1,8 +1,8 @@ # See sources.list(5) manpage for more information # Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool. -deb http://ftp.us.debian.org/debian &stable-codename; main contrib non-free -deb http://security.debian.org &stable-codename;/updates main contrib non-free +deb http://ftp.us.debian.org/debian &debian-stable-codename; main contrib non-free +deb http://security.debian.org &debian-stable-codename;/updates main contrib non-free # Uncomment if you want the apt-get source function to work -#deb-src http://ftp.us.debian.org/debian &stable-codename; main contrib non-free -#deb-src http://security.debian.org &stable-codename;/updates main contrib non-free +#deb-src http://ftp.us.debian.org/debian &debian-stable-codename; main contrib non-free +#deb-src http://security.debian.org &debian-stable-codename;/updates main contrib non-free diff --git a/vendor/getinfo b/vendor/getinfo index 4422f5d78..d45c0fca2 100755 --- a/vendor/getinfo +++ b/vendor/getinfo @@ -3,6 +3,7 @@ BASEDIR="$(readlink -f "$(dirname $0)")" INFO="$(readlink -f "${BASEDIR}/current/apt-vendor.ent")" +VERBATIM="${BASEDIR}/../doc/apt-verbatim.ent" if [ -z "$INFO" ] || [ ! -e "$INFO" ]; then echo >&2 'The current vendor is not valid or not chosen by the buildsystem yet.' @@ -20,17 +21,20 @@ getfield() { } case "$1" in -debian-stable-codename) - getrawfield 'stable-codename' "${BASEDIR}/../doc/apt-verbatim.ent" - ;; -tanglu-codename) - getrawfield 'tanglu-codename' "${BASEDIR}/../doc/apt-verbatim.ent" +debian-stable-codename|debian-oldstable-codename|debian-testing-codename) + getrawfield "${1#*-}" "$VERBATIM" ;; ubuntu-codename) - getrawfield 'ubuntu-codename' "${BASEDIR}/../doc/apt-verbatim.ent" + getrawfield "$1" "$VERBATIM" + ;; +keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri|current-codename) + exec $0 'vendor' "$@" + ;; +vendor) + getfield "$2" ;; -keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri|current-distro-codename) - getfield "$1" +verbatim) + getfield "$2" "$VERBATIM" ;; *) echo >&2 "Unknown data field $1 requested" diff --git a/vendor/makefile b/vendor/makefile index 619c603fb..0701a03eb 100644 --- a/vendor/makefile +++ b/vendor/makefile @@ -14,11 +14,9 @@ veryclean: veryclean/subdirs dirs: dirs/subdirs manpages: manpages/subdirs -all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs: - $(MAKE) -C current $(patsubst %/subdirs,%,$@) - -clean/subdirs veryclean/subdirs: - test ! -e current || $(MAKE) -C current $(patsubst %/subdirs,%,$@) +all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs clean/subdirs veryclean/subdirs: + test ! -e current/makefile || $(MAKE) -C current $(patsubst %/subdirs,%,$@) + test ! -e current/makefile.auto || $(MAKE) -C current -f makefile.auto $(patsubst %/subdirs,%,$@) current: rm -f $@ @@ -29,17 +27,29 @@ current: break; \ fi; \ done - # if we haven't found a specific, look for a deriving in hardcoded order - test -e $@ || \ - (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \ - (dpkg-vendor --derives-from tanglu && cp ln -s tanglu $@ ) || \ - ln -s debian $@ + # if we haven't found a specific, look for a deriving + # we do ubuntu and debian last as those are the biggest families + # and would therefore potentially 'shadow' smaller families + # (especially debian as it sorts quiet early) + if ! test -e $@; then \ + find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \ + if [ "$$DISTRO" = 'debian' -o "$$DISTRO" = 'ubuntu' ]; then continue; fi; \ + if dpkg-vendor --derives-from $$DISTRO; then \ + ln -s $$DISTRO $@; \ + break; \ + fi; \ + done; \ + test -e $@ || \ + (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \ + ln -s debian $@; \ + fi + if test ! -e current/makefile; then \ + sed "s#@@VENDOR@@#$(notdir $(shell readlink -f current))#" vendor.makefile > current/makefile.auto; \ + fi .PHONY: clean veryclean all binary vendor -.NOPARALLEL: clean: clean/current -clean/current: - test ! -e current || $(MAKE) -C current clean - rm -f current +clean/current: clean/subdirs + rm -f current/makefile.auto current diff --git a/vendor/raspbian/makefile b/vendor/raspbian/makefile deleted file mode 100644 index c4464900f..000000000 --- a/vendor/raspbian/makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=vendor/raspbian - -# Bring in the default rules -include ../../buildlib/defaults.mak - -doc binary manpages: sources.list - -sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&stable-codename;#$(shell ../getinfo debian-stable-codename)#g' $< > $@ - -clean: clean/sources.list - -clean/sources.list: - rm -f sources.list diff --git a/vendor/steamos/apt-vendor.ent b/vendor/steamos/apt-vendor.ent index 69bb254ef..dc1b798e6 100644 --- a/vendor/steamos/apt-vendor.ent +++ b/vendor/steamos/apt-vendor.ent @@ -3,6 +3,6 @@ valve-archive-keyring"> /usr/share/keyrings/valve-archive-keyring.gpg"> /usr/share/keyrings/valve-archive-removed-keys.gpg"> - + diff --git a/vendor/steamos/makefile b/vendor/steamos/makefile deleted file mode 100644 index 9ee0e65a2..000000000 --- a/vendor/steamos/makefile +++ /dev/null @@ -1,17 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=vendor/steamos - -# Bring in the default rules -include ../../buildlib/defaults.mak - -doc binary manpages: sources.list - -sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&stable-codename;#$(shell ../getinfo debian-stable-codename)#g' $< | sed -e 's#&steamos-codename;#$(shell ../getinfo current-distro-codename)#g' > $@ - -clean: clean/sources.list - -clean/sources.list: - rm -f sources.list - diff --git a/vendor/steamos/sources.list.in b/vendor/steamos/sources.list.in index fed6c3818..69174d090 100644 --- a/vendor/steamos/sources.list.in +++ b/vendor/steamos/sources.list.in @@ -1,5 +1,5 @@ # See sources.list(5) manpage for more information # Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool. -deb http://repo.steampowered.com/steamos &steamos-codename; main contrib non-free -deb-src http://repo.steampowered.com/steamos &steamos-codename; main contrib non-free +deb http://repo.steampowered.com/steamos ¤t-codename; main contrib non-free +deb-src http://repo.steampowered.com/steamos ¤t-codename; main contrib non-free diff --git a/vendor/tanglu/apt-vendor.ent b/vendor/tanglu/apt-vendor.ent index 4b70a5f82..d2442209c 100644 --- a/vendor/tanglu/apt-vendor.ent +++ b/vendor/tanglu/apt-vendor.ent @@ -5,3 +5,4 @@ /usr/share/keyrings/tanglu-archive-removed-keys.gpg"> + diff --git a/vendor/tanglu/makefile b/vendor/tanglu/makefile deleted file mode 100644 index 9fe680bc6..000000000 --- a/vendor/tanglu/makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=vendor/tanglu - -# Bring in the default rules -include ../../buildlib/defaults.mak - -doc binary manpages: sources.list - -sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&tanglu-codename;#$(shell ../getinfo tanglu-codename)#g' $< > $@ - -clean: clean/sources.list - -clean/sources.list: - rm -f sources.list diff --git a/vendor/tanglu/sources.list.in b/vendor/tanglu/sources.list.in index dfa219046..ce95e70c2 100644 --- a/vendor/tanglu/sources.list.in +++ b/vendor/tanglu/sources.list.in @@ -1,7 +1,7 @@ # See sources.list(5) manpage for more information -deb http://archive.tanglu.org/tanglu &tanglu-codename; main contrib non-free -#deb-src http://archive.tanglu.org/tanglu &tanglu-codename; main contrib non-free +deb http://archive.tanglu.org/tanglu ¤t-codename; main contrib non-free +#deb-src http://archive.tanglu.org/tanglu ¤t-codename; main contrib non-free -#deb http://archive.tanglu.org/tanglu &tanglu-codename;-updates main contrib non-free -#deb-src http://archive.tanglu.org/tanglu &tanglu-codename;-updates main contrib non-free +#deb http://archive.tanglu.org/tanglu ¤t-codename;-updates main contrib non-free +#deb-src http://archive.tanglu.org/tanglu ¤t-codename;-updates main contrib non-free diff --git a/vendor/ubuntu/makefile b/vendor/ubuntu/makefile deleted file mode 100644 index afcaaf718..000000000 --- a/vendor/ubuntu/makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=vendor/ubuntu - -# Bring in the default rules -include ../../buildlib/defaults.mak - -doc binary manpages: sources.list - -sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&ubuntu-codename;#$(shell ../getinfo ubuntu-codename)#g' $< > $@ - -clean: clean/sources.list - -clean/sources.list: - rm -f sources.list diff --git a/vendor/vendor.makefile b/vendor/vendor.makefile new file mode 100644 index 000000000..40b35ea3d --- /dev/null +++ b/vendor/vendor.makefile @@ -0,0 +1,21 @@ +# -*- make -*- +BASE=../.. +SUBDIR=vendor/@@VENDOR@@ + +# Bring in the default rules +include ../../buildlib/defaults.mak + +doc binary manpages: sources.list + +sources.list: sources.list.in ../../doc/apt-verbatim.ent + sed -e 's#&debian-stable-codename;#$(shell ../getinfo debian-stable-codename)#g' \ + -e 's#&debian-oldstable-codename;#$(shell ../getinfo debian-oldstable-codename)#g' \ + -e 's#&debian-testing-codename;#$(shell ../getinfo debian-testing-codename)#g' \ + -e 's#&ubuntu-codename;#$(shell ../getinfo ubuntu-codename)#g' \ + -e 's#¤t-codename;#$(shell ../getinfo current-codename)#g' \ + $< > $@ + +clean: clean/sources.list + +clean/sources.list: + rm -f sources.list -- cgit v1.2.3 From ced53a741a3a11da53920ee0bb86adb4e3a7c931 Mon Sep 17 00:00:00 2001 From: Mahyuddin Ramli Date: Tue, 22 Apr 2014 17:32:37 +0200 Subject: add vendor information for BlankOn Modified by commiter to not publicily export the codename (as the manpages do not use it that way) and removing the included additional derives logic as it was not working (the link always exists at that point) and isn't needed as we do the special casing for debian mainly because it would shallow all distributions otherwise. (similar, but not that strong for ubuntu) Closes: 743595 --- vendor/blankon/apt-vendor.ent | 8 ++++++++ vendor/blankon/sources.list.in | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 vendor/blankon/apt-vendor.ent create mode 100644 vendor/blankon/sources.list.in (limited to 'vendor') diff --git a/vendor/blankon/apt-vendor.ent b/vendor/blankon/apt-vendor.ent new file mode 100644 index 000000000..2600eb715 --- /dev/null +++ b/vendor/blankon/apt-vendor.ent @@ -0,0 +1,8 @@ + + +blankon-keyring"> +/usr/share/keyrings/blankon-archive-keyring.gpg"> +/usr/share/keyrings/blankon-archive-removed-keys.gpg"> + + + diff --git a/vendor/blankon/sources.list.in b/vendor/blankon/sources.list.in new file mode 100644 index 000000000..2322e974d --- /dev/null +++ b/vendor/blankon/sources.list.in @@ -0,0 +1,10 @@ +# See sources.list(5) manpage for more information +# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool. +deb http://arsip.blankonlinux.or.id/blankon ¤t-codename; main restricted +deb-src http://arsip.blankonlinux.or.id/blankon ¤t-codename; main restricted + +deb http://arsip.blankonlinux.or.id/blankon ¤t-codename;-security main restricted +deb-src http://arsip.blankonlinux.or.id/blankon ¤t-codename;-security main restricted + +deb http://arsip.blankonlinux.or.id/blankon ¤t-codename;-updates main restricted +deb-src http://arsip.blankonlinux.or.id/blankon ¤t-codename;-updates main restricted -- cgit v1.2.3 From feb81787827d973366ae20edcbce4bf5fccdebfd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 Apr 2014 18:59:22 +0200 Subject: add a README for vendor information --- vendor/README | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 vendor/README (limited to 'vendor') diff --git a/vendor/README b/vendor/README new file mode 100644 index 000000000..19cda6236 --- /dev/null +++ b/vendor/README @@ -0,0 +1,60 @@ +The vendor system in APT is an experiment to help distributions ship a stock +apt release instead of applying documentation patches to it, increasing +maintenance burden for everyone and hiding 'interesting' patches in the mix. + +The provided information is used in the apt-key script and in documentation +like manpages and example configuration files. If you have patches modifying +additional bits and pieces currently not covered by this system please +contact us so we can change this! + + +== Adding a new vendor + +In the same directory you found this README in you should create a new +directory with the name of your distribution (as defined by dpkg-vendor, + e.g. via "dpkg-vendor --query Vendor"). The name is case-insensitive, +but ensure that the name is otherwise correct and the other fields in +your deb-origin(5) file are correct as well as our buildsystem relies on +this information. + +If no information is found for the current vendor at buildtime, the system +looks for a vendor the current vendor is a derivative of, falling back to +Debian if all else fails. + +The directory should include 2 files at the moment. It is best to look +at the files of other distributions to understand what values are to be +expected. Some additional notes about them can be found below. + +If we happen to include new fields/files in this system, we will opt for +using a sensible default rather than failing the build or similar, so +you are recommend to watch this space. +Ensure also that your information is up-to-date! + +Contributing a new vendor as well as updating a existing one is best done +by opening a bug in the Debian BTS against apt with a patch attached. + + +== apt-vendor.ent + +The format used is the one DocBook XML uses. The file is included as an +entity file in the manpages xml source, so the syntax has to be valid! + +The keyring-* settings are additionally used also in the creation of the +apt-key script and the keyring-package in particular as a dependency for apt. + +The field current-codename is optional and can be used in sources.list.in. + + +== sources.list.in + +An example for a sources.list which will be shipped in /usr/share/doc. +This file will NOT be installed in /etc or otherwise used by apt. + +You can use some placeholders in this file, namely: +* &debian-stable-codename; +* &debian-oldstable-codename; +* &debian-testing-codename; +* &ubuntu-codename; +with the value you would expect based on the name. + +The placeholder ¤t-codename; is yours and can be set in apt-vendor.ent -- cgit v1.2.3 From c1b3d18934ce35f6a82b05207f53bf9b0cbfb961 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 26 Apr 2014 13:31:41 +0200 Subject: allow vendors to install configuration files Vendors like ubuntu need to change some options, so giving them a way to do this less painfully avoids reducing differences. --- vendor/README | 6 ++++++ vendor/ubuntu/apt.conf-01-vendor-ubuntu | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 vendor/ubuntu/apt.conf-01-vendor-ubuntu (limited to 'vendor') diff --git a/vendor/README b/vendor/README index 19cda6236..c2fabbd4c 100644 --- a/vendor/README +++ b/vendor/README @@ -58,3 +58,9 @@ You can use some placeholders in this file, namely: with the value you would expect based on the name. The placeholder ¤t-codename; is yours and can be set in apt-vendor.ent + + +== apt.conf-* + +Files in your vendor directory following this naming scheme will be picked up +by the debian/rules file and installed in /etc/apt/apt.conf.d/ directory. diff --git a/vendor/ubuntu/apt.conf-01-vendor-ubuntu b/vendor/ubuntu/apt.conf-01-vendor-ubuntu new file mode 100644 index 000000000..c4092ff44 --- /dev/null +++ b/vendor/ubuntu/apt.conf-01-vendor-ubuntu @@ -0,0 +1,6 @@ +// Server information for apt-changelog +APT { + Changelogs { + Server "http://changelogs.ubuntu.com/changelogs"; + }; +}; -- cgit v1.2.3