Refs #7593 - Debian packaging improved #1

Merged
jlopez merged 2 commits from 7593-updatePackage into master 2024-10-25 10:51:04 +00:00
18 changed files with 199 additions and 43 deletions

View File

@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIID6jCCAtKgAwIBAgIBCzANBgkqhkiG9w0BAQsFADBoMQswCQYDVQQGEwJFUzEO
MAwGA1UECAwFU3BhaW4xETAPBgNVBAcMCFZhbGVuY2lhMR4wHAYDVQQKDBVWZXJk
bmF0dXJhIExldmFudGUgU0wxFjAUBgNVBAMMDVZlcmRuYXR1cmEgQ0EwHhcNMjQw
NjEzMDc0MTE2WhcNNDQwNjA4MDc0MTE2WjBpMQswCQYDVQQGEwJFUzEOMAwGA1UE
CAwFU3BhaW4xETAPBgNVBAcMCFZhbGVuY2lhMR4wHAYDVQQKDBVWZXJkbmF0dXJh
IExldmFudGUgU0wxFzAVBgNVBAMMDlZlcmRuYXR1cmEgTGFiMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEArKqvodZFH2RNfSJ5tzNlxdcrSKl3iLF7ImeU
/WlXXnUKxdsXFTq+HbychOc6fYOzTccvUxcgBz14j1ikqF98NLqEHy1vR5tfUGWL
uNIQQ+aEaycuZupeCVNxo9LZ5L2HOJvBZdrhFE92op9BRNiNV4yqS+nkIvUyo4YJ
ljUYAyVG5ZQAd5bEC5DXwehBaNkCcpIipWkYuFGh3UpHd85FCcmEXXBuyMQhb7FY
iqcK9yRfky10jf6K6JyxYBvHCnna5/rDFqQZthWUCgIfIS090EEKkIBqUNsuLdhF
SZGFXXBgVwslmAynoDF4CUddFrpyAhQmg5DND96WEHbW4K+3vQIDAQABo4GdMIGa
MDcGCWCGSAGG+EIBDQQqFihPUE5zZW5zZSBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUg
QXV0aG9yaXR5MB0GA1UdDgQWBBQ9+iZdf7pLNQItxs4o43dNFZD0CTAfBgNVHSME
GDAWgBQ9+iZdf7pLNQItxs4o43dNFZD0CTAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAQEAKBs4HaE/BVmgxzZt0RIQGmkT
dLEoPSBYO9jzdbDl51yEmYqPHDTaV41Q6fUGKQ4wHuzyJIOZVhe4jS6lloorE3bC
7GANN4bG8QJhMHGO1wMTqjlPlekVaCdEUQZMRtMd7t9fUeJtKjDDj/IbyVpbsJcO
10fxGuaWzn5N8/cn0r+ck2uwo2rGPBqTAPxzBAy9aOaAH/5uETsDYCN57Udv76zR
NeZKVM9Uk1XR0PxMIB5sFTO1S8zLEr70yWzHaL1Oyaep5n/u54JKvyz8NXBB9RH0
WQqdLhM0tuSMLSTPNJGkxfFH/SbBnJ2qLx1JCVMLaTwYqBOfs2eZN2MzMudPLA==
-----END CERTIFICATE-----

15
debian/changelog vendored
View File

@ -1,3 +1,18 @@
vn-host (3.0.0) stable; urgency=medium
* Set debian-branch to bookworm.
* Fix verdnatura apt repository to use bookworm only.
* Renamed certificates files and Intermediate LAB CA added.
* Improved debian packaging:
- Added missing ca-certificates dependence.
- Added manpage for update-repo script
- Added uploaders in debian/control
- Splited into multiple packages
- vn-host package for CA management
- vn-apt-source package to add custom Verdnatura repository
-- Fco Javier Lopez Perez <jlopez@verdnatura.es> Thu, 12 Sep 2024 16:12:52 +0200
vn-host (2.1.1) stable; urgency=low vn-host (2.1.1) stable; urgency=low
* Initial Release. * Initial Release.

16
debian/control vendored
View File

@ -1,7 +1,8 @@
Source: vn-host Source: vn-host
Priority: optional Priority: optional
Maintainer: Juan Ferrer Toribio <juan@verdnatura.es> Maintainer: Juan Ferrer Toribio <juan@verdnatura.es>
Build-Depends: build-essential, debhelper Uploaders: Fco Javier Lopez Perez <jlopez@verdnatura.es>
Build-Depends: debhelper (>=10)
Standards-Version: 3.9.3 Standards-Version: 3.9.3
Section: misc Section: misc
Homepage: https://verdnatura.es Homepage: https://verdnatura.es
@ -9,8 +10,17 @@ Vcs-Git: https://gitea.verdnatura.es/
Package: vn-host Package: vn-host
Architecture: all Architecture: all
Depends: gpgv Depends: vn-apt-source, ca-certificates (>= 20130119), ${misc:Depends}
Section: misc Section: misc
Priority: optional Priority: optional
Description: Verdnatura certificates Description: Verdnatura certificates
Public Verdnatura certificates and APT repository. Public Verdnatura certificates.
Package: vn-apt-source
Architecture: all
Depends: gpgv, ${misc:Depends}
Section: misc
Priority: optional
Description: Verdnatura APT repository
Public Verdnatura APT repository.

39
debian/copyright vendored
View File

@ -1,24 +1,19 @@
Format: http://dep.debian.net/deps/dep5 # -*- coding: utf-8 -*-
Name: vn-host This package was debianized by Fco Javier Lopez Perez <jlopez@verdnatura.es> on
Source: https://gitea.verdnatura.es/ Thu, 17 Oct 2024 14:00:00 +0100.
Files: * It was downloaded from:
Copyright: 2011-2015 Juan Ferrer Toribio <juan@verdnatura.es>
License: GPL-3.0+ https://gitea.verdnatura.es/
Upstream Authors:
Juan Ferrer Toribio <juan@verdnatura.es>
Fco Javier Lopez Perez <jlopez@verdnatura.es>
Copyright:
Copyright (C) 2011-2015 Juan Ferrer Toribio <juan@verdnatura.es>, Verdnatura Levante SL
Copyright (C) 2024 Fco Javier Lopez Perez <jlopez@verdnatura.es>, Verdnatura Levante SL
These scripts are released under the GPL version 3 (or any later version),
available on any Debian box at: /usr/share/common-licenses/GPL-3
License: GPL-3.0+
This package 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 3 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.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public
License can be found in "/usr/share/common-licenses/GPL-3".

5
debian/install vendored
View File

@ -1,5 +0,0 @@
verdnatura.gpg etc/apt/trusted.gpg.d
ca.pem usr/share/ca-certificates/verdnatura.es
old-ca.pem usr/share/ca-certificates/verdnatura.es
update-repo usr/sbin
vn.list etc/apt/sources.list.d

2
debian/links vendored
View File

@ -1,2 +0,0 @@
usr/share/ca-certificates/verdnatura.es/ca.pem etc/ssl/certs/Verdnatura_CA.pem
usr/share/ca-certificates/verdnatura.es/old-ca.pem etc/ssl/certs/Verdnatura_CA_old.pem

1
debian/rules vendored
View File

@ -4,4 +4,3 @@
%: %:
dh $@ dh $@

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

3
debian/vn-apt-source.install vendored Normal file
View File

@ -0,0 +1,3 @@
verdnatura.gpg etc/apt/keyrings
update-repo usr/sbin
vn.list etc/apt/sources.list.d

1
debian/vn-apt-source.manpages vendored Normal file
View File

@ -0,0 +1 @@
doc/update-repo.8

3
debian/vn-host.install vendored Normal file
View File

@ -0,0 +1,3 @@
VerdnaturaCA.crt usr/share/ca-certificates/verdnatura
VerdnaturaIntermediateLab.crt usr/share/ca-certificates/verdnatura
VerdnaturaInformaticaCA.crt usr/share/ca-certificates/verdnatura

56
debian/vn-host.postinst vendored Normal file
View File

@ -0,0 +1,56 @@
#! /bin/sh
# postinst script for vn-host
#
# see: dh_installdeb(1)
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
set -e
CERTS="VerdnaturaCA.crt VerdnaturaIntermediateLab.crt VerdnaturaInformaticaCA.crt"
CERTSDIR=/usr/share/ca-certificates
VERDNATURACERTSDIR="${CERTSDIR}/verdnatura"
LOCALCERTSDIR=/usr/local/share/ca-certificates
case "$1" in
configure)
# Force install verdnatura certificates from installation directory
# update-ca-certificates only process files in /usr/local/share/ca-certificates
# See lintian-explain-tags dir-in-usr-local for more explain
for certfile in ${CERTS} ; do
ln -s ${VERDNATURACERTSDIR}/${certfile} ${LOCALCERTSDIR}
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

48
debian/vn-host.postrm vendored Normal file
View File

@ -0,0 +1,48 @@
#! /bin/sh
# postrm script for vn-host
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see /usr/share/doc/packaging-manual/
# Clear the debconf database as early as possible and signal debconf that
# we are done with it.
CERTS="VerdnaturaCA.crt VerdnaturaIntermediateLab.crt VerdnaturaInformaticaCA.crt"
CERTSDIR=/usr/share/ca-certificates
VERDNATURACERTSDIR="${CERTSDIR}/verdnatura"
LOCALCERTSDIR=/usr/local/share/ca-certificates
case "$1" in
remove|purge)
for certfile in ${CERTS} ; do
unlink ${LOCALCERTSDIR}/${certfile} 2>/dev/null || true
done
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#

1
debian/vn-host.triggers vendored Normal file
View File

@ -0,0 +1 @@
activate-await update-ca-certificates-fresh

16
doc/update-repo.8 Normal file
View File

@ -0,0 +1,16 @@
.\" Copyright: 2024 Fco Javier Lopez Perez <jlopez@verdnatura.es>
.TH UPDATE-REPO 8 "" "Debian GNU/Linux"
.SH NAME
update-repo \- update apt packages from repository
.SH SYNOPSIS
.SY update-repo
.B repo
.SH DESCRIPTION
\fBupdate-repo\fP command refresh apt packages cache information
from repository parameter.
.SH NOTES
The parameter \fBrepo\fP used to update repository packages cache,
is the file /etc/apt/sources.list.d/repo.list at disk.
.SH SEE ALSO
.BR apt (8),
.BR apt-get (8)

12
vn.list
View File

@ -1,10 +1,2 @@
deb [signed-by=/etc/apt/keyrings/verdnatura.gpg] http://apt.verdnatura.es/ bookworm main
deb http://apt.verdnatura.es/ testing main #deb-src [signed-by=/etc/apt/keyrings/verdnatura.gpg] http://apt.verdnatura.es/ bookworm main
deb-src http://apt.verdnatura.es/ testing main
deb http://apt.verdnatura.es/ stable main
deb-src http://apt.verdnatura.es/ stable main
deb http://apt.verdnatura.es/ oldstable main
deb-src http://apt.verdnatura.es/ oldstable main