Outils pour utilisateurs

Outils du site


blog

8 billet(s) pour mars 2026

Notes conteneurs oras artifact OCI2026/03/23 21:13Jean-Baptiste
Notes podman secret2026/03/23 15:10Jean-Baptiste
Notes ansible podman2026/03/23 14:08Jean-Baptiste
Notes podman volume2026/03/23 14:00Jean-Baptiste
Find list - Trouver des fichiers à partir d'une liste2026/03/18 14:32Jean-Baptiste
AWX inventaire vault2026/03/17 18:04Jean-Baptiste
AWX - Configuration git en local (sans serveur web)2026/03/05 16:24Jean-Baptiste
OpenSMTP2026/03/03 16:58Jean-Baptiste

Notes paquets makeself

/home/siber/goodsync/packages/generic-sfx/megastep-makeself-be1c982/makeself.sh \
    "--nomd5" \
    "--nocrc" \
    "/home/siber/goodsync/packages/generic-sfx/package-files" \
    "goodsync-linux-x86_64-release.run" \
    "GoodServer for Unix/Linux version 10.5.9.9" \
    "./install-script.sh"

Script run after extraction:

   ./install-script.sh
2025/03/24 15:06

Notes paquets Debian deb

Paquets

Voir :

apt-get install debconf-utils
#debconf-get-selections
debconf-get-selections  |grep -B1 '^postfix'
#debconf-get-selections | ssh nouvelhôte debconf-set-selections

EXEMPLES

# Forcer la priorité de debconf à critique (« critical »).
debconf debconf/priority select critical

# Remplacer l'interface par défaut par readline, 
# mais autoriser l'utilisateur à choisir.
debconf debconf/frontend select readline
debconf debconf/frontend seen false

Notes fstab

/etc/fstab
/var/tmp /tmp    none bind 0 0

Déploiement

Fichier de réponse paquet Debian

sudo debconf-get-selections
 
export DEBIAN_FRONTEND="noninteractive"
 
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password rootpw"
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password rootpw"
 
sudo apt-get install -y mysql-server-5.6

Paquets obsolètes Après un dist-upgrade certains paquets ne sont plus maintenu

Pour les lister

aptitude search '~o'

Pour les supprimer

aptitude purge '~o'
2025/03/24 15:06

Boot systemd boot non-graphique

Source : Non-graphical boot with systemd

Voir aussi https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Targets.html

Testé sur Debian 8 Jessie

Open a terminal and (as root) run:

systemctl set-default multi-user.target

ou avec --force

systemctl set-default -f multi-user.target

Retour arrière - réactivation mode graphique

systemctl set-default graphical.target

Vérif

systemctl get-default

Boot paramètre noyaux Linux

parameter to your kernel boot line

systemd.unit=multi-user.target
Ajout nouvelle entrée au grub sous Debian

Sous Debian

vimdiff /boot/grub/grub.cfg /boot/grub/custom.cfg
/boot/grub/custom.cfg
menuentry 'Debian GNU/Linux nographic' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-816ff92d-1a71-4f82-b009-a5ef6f469a25' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  82c94e9f-f7c8-40dc-9e94-9d0afcac7fe6
        else
          search --no-floppy --fs-uuid --set=root 82c94e9f-f7c8-40dc-9e94-9d0afcac7fe6
        fi
        echo    'Loading Linux 3.16.0-4-amd64 ...'
        linux   /vmlinuz-3.16.0-4-amd64 root=/dev/mapper/vgos-root ro systemd.unit=multi-user.target
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-4-amd64
}
cat /boot/grub/grub.cfg |sed -ne '/^menuentry/,/}/p' |sed -e 's/\(linux.*\) quiet/\1 systemd.unit=multi-user.target/' |sed -e 's%Debian GNU/Linux%Debian GNU/Linux NonGraphique%' > /boot/grub/custom.cfg

Changer le runlevel / target maintenant

# runlevel
systemctl list-units --type target
# telinit 3
# init 3
systemctl isolate multi-user.target
 
# init 5
systemctl isolate graphical.target

Autres

#unlink /etc/systemd/system/default.target
#ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
systemctl set-default multi-user.target  
2025/03/24 15:06

Notes paquet RPM Redhat CentOS

Voir aussi yum createrepo

Création et modification

Voir :

yum install rpmdevtools
 
mkdir -p rpmbuild/{BUILDROOT,SPECS}
 
cd rpmbuild/SPECS/
rpmdev-newspec plop

Récupérer les fichiers

rpm2cpio ../plop-1.8.8-2.noarch.rpm | cpio -idmv
For Reference: the cpio arguments are :
-i = extract
-d = make directories
-m = preserve modification time
-v = verbose

Récup script post-install

rpm -qp --scripts plop-1.8.8-2.noarch.rpm

Éditer un paquet RPM en modifiant le SPEC

sudo yum install rpmrebuild
rpmrebuild -e -p plop-1.8.8-2.noarch.rpm

Générer un SPEC d'un RPM existant

rpmrebuild -s plop.spec  -p ../plop-1.8.8-2.noarch.rpm

Créer un RPM

cd ~/rpmbuild
rpmbuild --target=noarch -bb --sign SPECS/plop.spec
cd RPMS/noarch

Exemple de fichier .spec avec PHP (pas de compilation)

plop.spec
%define name superrpm
%define version 1.5.6
%define release 2

Summary: Application super RPM
Name: %{name}
Version: %{version}
Release: %{release}
Vendor: Acme
URL: http://www.acme.fr/
License: GPL3
Group: Web application
Prefix: %{_prefix}
Requires: php >= 5.2.4, mysql-server, php-pdo, httpd, php-soap, php-mbstring, php-mysql, php-xml, dmraid >= 1.0.0.rc13-53,php-gd
BuildArch: noarch

%description
Super paquet RPM

%post
chmod -R 777 /var/www/Superrpm/
chown root:root /etc/httpd/conf.d/superrpm.conf

service httpd reload


%files
#%defattr(755,root,root,644)
%defattr(-,-,-)
#/*
/etc/cron.daily/update-plop
/etc/cron.hourly/tache_plop.sh
/etc/httpd/conf.d/plop.conf
/etc/yum.repos.d/plop.repo
/etc/php-fpm.d/plop.conf
/etc/my.cnf.d/plop.cnf
/var/www/plop/


%changelog
* Mon Apr 25 2016 Equipe dev Acme <dev@null.fr>
- Plop : bugfixed
* Mon May 4 2009 Equipe dev Acme <dev@null.fr>
- Première paquet RPM

Notes attr

1. The default permissions, or "mode" for files.
2. The default user id.
3. The default group id.
4. The default permissions, or "mode" for directories.
Autres
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
2025/03/24 15:06

Notes paquet Debian Python

Création de package Debian à partir de PIP Python. Création du package ansible-lint

Voir exemple notes_slurm-web_et_pyslurm

Voir aussi :

git clone https://github.com/willthames/ansible-lint
cd ansible-lint
mkdir debian
debian/changelog
ansible-lint (3.4.9-1) unstable; urgency=medium

  * Initial release

 -- Jean-Baptiste <nospam@me.null>  Thu, 05 Jan 2017 15:33:33 +0200

Attention, 2 espaces après l'adresse email.

Voici les règles de syntaxe

package (version) distribution(s); urgency=urgency
            [optional blank line(s), stripped]
  * change details
    more change details
            [blank line(s), included in output of dpkg-parsechangelog]
  * even more change details
            [optional blank line(s), stripped]
 -- maintainer name <email address>[two spaces]  date
debian/control
Source: ansible-lint
Section: python
Priority: optional
Maintainer: Jean-Baptiste <nospam@me.null>
Build-Depends: debhelper (>= 9), dh-python, python
Standards-Version: 3.4.9
Homepage: https://github.com/willthames/ansible-lint

Package: ansible-lint
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}, ${python3:Depends}, python-yaml, python
Description: Best practices checker for Ansible
 Checks playbooks for practices and behavior that could potentially be improved
debian/copyright
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ansible-lint
Source: https://github.com/willthames/ansible-lint

Files: debian/*
Copyright: (c) 2017, ACME
License: GPL-3
 Please refer to /usr/share/common-licenses/GPL-3

Files: *
Copyright: (c) 2013-2014 Will Thames <will@thames.id.au>
License: MIT
Please refer to https://github.com/willthames/ansible-lint/blob/master/LICENSE
debian/rules
#!/usr/bin/make -f
#export DH_VERBOSE = 1

%:
        dh $@ --with python2 --buildsystem=pybuild

override_dh_auto_build:

override_dh_auto_install:
        python setup.py build --force -b build/ install --force --root=debian/tmp --no-compile -O0 --install-layout=deb
debuild -us -uc -b

Autres

debian/rules
#!/usr/bin/make -f

%:
        dh $@
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki