From 1a854dce33e52bf8bd863e9b0eb54e51c087191e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 13:45:48 +0200 Subject: Merging debian version 13.1. Signed-off-by: Daniel Baumann --- debian/base-files.links | 2 +- debian/changelog | 9 +++ debian/clean | 1 - debian/copyright | 65 ++++++++++++--------- debian/gbp.conf | 4 ++ debian/postinst | 149 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/postinst.in | 148 ----------------------------------------------- debian/rules | 4 +- 8 files changed, 203 insertions(+), 179 deletions(-) create mode 100644 debian/gbp.conf create mode 100644 debian/postinst delete mode 100644 debian/postinst.in diff --git a/debian/base-files.links b/debian/base-files.links index 3166652..3dd0249 100644 --- a/debian/base-files.links +++ b/debian/base-files.links @@ -1,4 +1,4 @@ -usr/share/doc/base-files/README usr/share/doc/base-files/FAQ +usr/share/doc/base-files/README usr/share/doc/base-files/FAQ usr/share/common-licenses/GFDL-1.3 usr/share/common-licenses/GFDL usr/share/common-licenses/LGPL-3 usr/share/common-licenses/LGPL usr/share/common-licenses/GPL-3 usr/share/common-licenses/GPL diff --git a/debian/changelog b/debian/changelog index 5418a6c..44bd6e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +base-files (13.1) unstable; urgency=medium + + * Rename postinst.in to postinst. Use dh_installdeb token feature instead. + * Add /usr/local/libexec. Closes: #994220. + * Machine-readable copyright file. Closes: #1020828. + * Add a debian/gbp.conf file. + + -- Santiago Vila Wed, 17 Apr 2024 12:45:00 +0200 + base-files (13-0.0~progress7.99u1) graograman-backports; urgency=medium * Initial reupload to graograman-backports. diff --git a/debian/clean b/debian/clean index ccba3ce..e69de29 100644 --- a/debian/clean +++ b/debian/clean @@ -1 +0,0 @@ -debian/postinst diff --git a/debian/copyright b/debian/copyright index 3f5ed9b..a971207 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,28 +1,37 @@ -This is the Debian prepackaged version of the Debian Base System -Miscellaneous files. These files were written by Ian Murdock - and Bruce Perens . - -This package was first put together by Bruce Perens , -from his own sources. - -The GNU Public Licenses in /usr/share/common-licenses were taken from -ftp.gnu.org and are copyrighted by the Free Software Foundation, Inc. - -The Artistic License in /usr/share/common-licenses is the one coming -from Perl and its SPDX name is "Artistic License 1.0 (Perl)". - - -Copyright (C) 1995-2011 Software in the Public Interest. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Comment: + This is the Debian prepackaged version of the Debian Base System + Miscellaneous files. These files were written by Ian Murdock + and Bruce Perens . + . + This package was first put together by Bruce Perens , + from his own sources. + +Files: * +Copyright: (C) 1995-2011 Software in the Public Interest +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL'. +Comment: + The Artistic License in /usr/share/common-licenses is the one coming + from Perl and its SPDX name is "Artistic License 1.0 (Perl)". + +Files: licenses/GFDL-* + licenses/GPL-* + licenses/LGPL-* +Copyright: 1989-2008 Free Software Foundation, Inc. +License: verbatim + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +Comment: + The GNU licenses in /usr/share/common-licenses were taken from ftp.gnu.org. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..6f74a48 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,4 @@ +[DEFAULT] +upstream-branch = master +debian-branch = master +debian-tag = %(version)s diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..d7bf2bc --- /dev/null +++ b/debian/postinst @@ -0,0 +1,149 @@ +#!/bin/sh +set -e + +ensure_file_owner_mode() { + if [ ! -f "$DPKG_ROOT$1" ]; then + : > "$DPKG_ROOT$1" + fi + chown "$2" "$DPKG_ROOT$1" + chmod "$3" "$DPKG_ROOT$1" +} + +install_local_dir() { + if [ ! -d "$DPKG_ROOT$1" ]; then + mkdir -p "$DPKG_ROOT$1" + fi + if [ -f "$DPKG_ROOT/etc/staff-group-for-usr-local" ]; then + chown root:staff "$DPKG_ROOT$1" 2>/dev/null || true + chmod 2775 "$DPKG_ROOT$1" 2> /dev/null || true + fi +} + +install_from_default() { + if [ ! -f "$DPKG_ROOT$2" ]; then + cp -p "$DPKG_ROOT/usr/share/base-files/$1" "$DPKG_ROOT$2" + fi +} + +install_directory() { + if [ ! -d "$DPKG_ROOT/$1" ]; then + mkdir "$DPKG_ROOT/$1" + chown "root:$3" "$DPKG_ROOT/$1" + chmod "$2" "$DPKG_ROOT/$1" + fi +} + +migrate_directory() { + if [ ! -L "$DPKG_ROOT$1" ]; then + rmdir "$DPKG_ROOT$1" + ln -s "$2" "$DPKG_ROOT$1" + fi +} + +update_to_current_default() { + if [ -f "$2" ]; then + md5=$(md5sum "$2" | cut -f 1 -d " ") + if grep -q "$md5" "/usr/share/base-files/$1.md5sums"; then + if ! cmp -s "/usr/share/base-files/$1" "$2"; then + cp -p "/usr/share/base-files/$1" "$2" + echo Updating $2 to current default. + fi + fi + fi +} + +# remove debian origin default symlink +if [ -h "$DPKG_ROOT/etc/dpkg/origins/default" ]; then + if [ "`readlink "$DPKG_ROOT/etc/dpkg/origins/default"`" = "debian" ]; then + rm -f "$DPKG_ROOT/etc/dpkg/origins/default" + fi +fi + +if [ ! -e "$DPKG_ROOT/etc/dpkg/origins/default" ]; then + if [ -e "$DPKG_ROOT/etc/dpkg/origins/#VENDORFILE#" ]; then + ln -sf #VENDORFILE# "$DPKG_ROOT/etc/dpkg/origins/default" + fi +fi + +if [ "$1" = "configure" ] && [ "$2" = "" ]; then + install_from_default dot.profile /root/.profile + install_from_default dot.bashrc /root/.bashrc + install_from_default profile /etc/profile + install_from_default motd /etc/motd + install_directory mnt 755 root + install_directory srv 755 root + install_directory opt 755 root + install_directory etc/opt 755 root + install_directory var/opt 755 root + install_directory media 755 root + install_directory var/mail 2775 mail + if [ ! -L "$DPKG_ROOT/var/spool/mail" ]; then + ln -s ../mail "$DPKG_ROOT/var/spool/mail" + fi + install_directory run/lock 1777 root + migrate_directory /var/run /run + migrate_directory /var/lock /run/lock + + install_local_dir /usr/local + install_local_dir /usr/local/share + install_local_dir /usr/local/share/man + install_local_dir /usr/local/bin + install_local_dir /usr/local/games + install_local_dir /usr/local/lib + install_local_dir /usr/local/libexec + install_local_dir /usr/local/include + install_local_dir /usr/local/sbin + install_local_dir /usr/local/src + install_local_dir /usr/local/etc + ln -sf share/man "$DPKG_ROOT/usr/local/man" + + ensure_file_owner_mode /var/log/wtmp root:utmp 664 + ensure_file_owner_mode /var/log/btmp root:utmp 660 + ensure_file_owner_mode /var/log/lastlog root:utmp 664 +fi + +if [ -d "$DPKG_ROOT/usr/share/info" ] && [ ! -f "$DPKG_ROOT/usr/info/dir" ] && [ ! -f "$DPKG_ROOT/usr/share/info/dir" ]; then + install_from_default info.dir /usr/share/info/dir + chmod 644 $DPKG_ROOT/usr/share/info/dir +fi + +if [ "$1" = "configure" ] && [ "$2" != "" ]; then + update_to_current_default profile /etc/profile + update_to_current_default dot.profile /root/.profile + update_to_current_default motd /etc/motd + if dpkg --compare-versions "$2" lt-nl "7.7"; then + install_directory mnt 755 root + fi +fi + +case "${1}" in + configure) + . /usr/share/debconf/confmodule + + db_get base-files/os-identification + OS_IDENTIFICATION="${RET}" # select (w/o empty) + + db_stop + + rm -f /etc/lsb-release + rm -f /usr/lib/os-release + rm -f /etc/dpkg/origins/default + rm -f /etc/dpkg/origins/progress-linux + rm -f /etc/progress-linux_version + + case "${OS_IDENTIFICATION}" in + debian) + cp /usr/share/base-files/debian/os-release /usr/lib/os-release + ln -s debian /etc/dpkg/origins/default + ;; + + progress-linux) + cp /usr/share/base-files/progress-linux/lsb-release /etc/lsb-release + cp /usr/share/base-files/progress-linux/os-release /usr/lib/os-release + cp /usr/share/base-files/progress-linux/progress-linux /etc/dpkg/origins/progress-linux + ln -s progress-linux /etc/dpkg/origins/default + cp /usr/share/base-files/progress-linux/progress-linux_version /etc/progress-linux_version + ;; + esac + ;; +esac diff --git a/debian/postinst.in b/debian/postinst.in deleted file mode 100644 index bf2bd4e..0000000 --- a/debian/postinst.in +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/sh -set -e - -ensure_file_owner_mode() { - if [ ! -f "$DPKG_ROOT$1" ]; then - : > "$DPKG_ROOT$1" - fi - chown "$2" "$DPKG_ROOT$1" - chmod "$3" "$DPKG_ROOT$1" -} - -install_local_dir() { - if [ ! -d "$DPKG_ROOT$1" ]; then - mkdir -p "$DPKG_ROOT$1" - fi - if [ -f "$DPKG_ROOT/etc/staff-group-for-usr-local" ]; then - chown root:staff "$DPKG_ROOT$1" 2>/dev/null || true - chmod 2775 "$DPKG_ROOT$1" 2> /dev/null || true - fi -} - -install_from_default() { - if [ ! -f "$DPKG_ROOT$2" ]; then - cp -p "$DPKG_ROOT/usr/share/base-files/$1" "$DPKG_ROOT$2" - fi -} - -install_directory() { - if [ ! -d "$DPKG_ROOT/$1" ]; then - mkdir "$DPKG_ROOT/$1" - chown "root:$3" "$DPKG_ROOT/$1" - chmod "$2" "$DPKG_ROOT/$1" - fi -} - -migrate_directory() { - if [ ! -L "$DPKG_ROOT$1" ]; then - rmdir "$DPKG_ROOT$1" - ln -s "$2" "$DPKG_ROOT$1" - fi -} - -update_to_current_default() { - if [ -f "$2" ]; then - md5=$(md5sum "$2" | cut -f 1 -d " ") - if grep -q "$md5" "/usr/share/base-files/$1.md5sums"; then - if ! cmp -s "/usr/share/base-files/$1" "$2"; then - cp -p "/usr/share/base-files/$1" "$2" - echo Updating $2 to current default. - fi - fi - fi -} - -# remove debian origin default symlink -if [ -h "$DPKG_ROOT/etc/dpkg/origins/default" ]; then - if [ "`readlink "$DPKG_ROOT/etc/dpkg/origins/default"`" = "debian" ]; then - rm -f "$DPKG_ROOT/etc/dpkg/origins/default" - fi -fi - -if [ ! -e "$DPKG_ROOT/etc/dpkg/origins/default" ]; then - if [ -e "$DPKG_ROOT/etc/dpkg/origins/#VENDORFILE#" ]; then - ln -sf #VENDORFILE# "$DPKG_ROOT/etc/dpkg/origins/default" - fi -fi - -if [ "$1" = "configure" ] && [ "$2" = "" ]; then - install_from_default dot.profile /root/.profile - install_from_default dot.bashrc /root/.bashrc - install_from_default profile /etc/profile - install_from_default motd /etc/motd - install_directory mnt 755 root - install_directory srv 755 root - install_directory opt 755 root - install_directory etc/opt 755 root - install_directory var/opt 755 root - install_directory media 755 root - install_directory var/mail 2775 mail - if [ ! -L "$DPKG_ROOT/var/spool/mail" ]; then - ln -s ../mail "$DPKG_ROOT/var/spool/mail" - fi - install_directory run/lock 1777 root - migrate_directory /var/run /run - migrate_directory /var/lock /run/lock - - install_local_dir /usr/local - install_local_dir /usr/local/share - install_local_dir /usr/local/share/man - install_local_dir /usr/local/bin - install_local_dir /usr/local/games - install_local_dir /usr/local/lib - install_local_dir /usr/local/include - install_local_dir /usr/local/sbin - install_local_dir /usr/local/src - install_local_dir /usr/local/etc - ln -sf share/man "$DPKG_ROOT/usr/local/man" - - ensure_file_owner_mode /var/log/wtmp root:utmp 664 - ensure_file_owner_mode /var/log/btmp root:utmp 660 - ensure_file_owner_mode /var/log/lastlog root:utmp 664 -fi - -if [ -d "$DPKG_ROOT/usr/share/info" ] && [ ! -f "$DPKG_ROOT/usr/info/dir" ] && [ ! -f "$DPKG_ROOT/usr/share/info/dir" ]; then - install_from_default info.dir /usr/share/info/dir - chmod 644 $DPKG_ROOT/usr/share/info/dir -fi - -if [ "$1" = "configure" ] && [ "$2" != "" ]; then - update_to_current_default profile /etc/profile - update_to_current_default dot.profile /root/.profile - update_to_current_default motd /etc/motd - if dpkg --compare-versions "$2" lt-nl "7.7"; then - install_directory mnt 755 root - fi -fi - -case "${1}" in - configure) - . /usr/share/debconf/confmodule - - db_get base-files/os-identification - OS_IDENTIFICATION="${RET}" # select (w/o empty) - - db_stop - - rm -f /etc/lsb-release - rm -f /usr/lib/os-release - rm -f /etc/dpkg/origins/default - rm -f /etc/dpkg/origins/progress-linux - rm -f /etc/progress-linux_version - - case "${OS_IDENTIFICATION}" in - debian) - cp /usr/share/base-files/debian/os-release /usr/lib/os-release - ln -s debian /etc/dpkg/origins/default - ;; - - progress-linux) - cp /usr/share/base-files/progress-linux/lsb-release /etc/lsb-release - cp /usr/share/base-files/progress-linux/os-release /usr/lib/os-release - cp /usr/share/base-files/progress-linux/progress-linux /etc/dpkg/origins/progress-linux - ln -s progress-linux /etc/dpkg/origins/default - cp /usr/share/base-files/progress-linux/progress-linux_version /etc/progress-linux_version - ;; - esac - ;; -esac diff --git a/debian/rules b/debian/rules index 5f8cc31..6b62db0 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,6 @@ DESTDIR = debian/base-files override_dh_auto_build: sh debian/check-md5sum-etc profile - sed -e "s/#VENDORFILE#/$(VENDORFILE)/g" debian/postinst.in > debian/postinst override_dh_auto_install: install -p -m 644 etc/* $(DESTDIR)/etc @@ -55,3 +54,6 @@ override_dh_fixperms: cd debian/base-files && chmod 1777 `cat ../1777-dirs` cd debian/base-files && chmod 2775 `cat ../2775-dirs` cd debian/base-files && chmod 700 root + +override_dh_installdeb: + dh_installdeb -DVENDORFILE=$(VENDORFILE) -- cgit v1.2.3