Perl Projekt - Ordnerstruktur und Package Building

Hi,

ich programmieren zZ an einem kleinen in Perl geschriebenen Projekt, welches ich als DEB und RPM Packet ausliefern möchte. Ich habe mich allerdings noch nie wirklich mit Organisation in einem solchen Projekt beschäftigt. Momentan ist alles in einem Git Repository und die Skripte liegen einfach direkt vom Root Verzeichnis. Letztlich muss das DEB / RPM ein paar Scripte im Filesystem verteilen, eine Konfigurationsdatei nach /etc legen und ein paar CRON jobs anlegen. Was muss ich beachten, damit ich das später halbwegs bequem zu Packages verarbeiten kann? Sollte ich z.B. gleich Unterordner anlegen ala /usr/bin und dort meine Scripte reinlegen? Kennt vllt jemand ein Perl Projekt, das man über Git auschecken kann um sich das mal anzuschauen wie das aufgebaut ist?

Grüße
serow
 
Zumindest für Debian gibt es dafür eine Policy:
Debian Perl Policy

Ist eher eine Richtlinie. Ansonsten einfach mal irgendein Perl-Paket suchen und mit "apt-get source $paket" runterladen. Da siehst du, wie der Aufbau da funktioniert. Bei den meisten gibts in der Datei debian/control auch eine Zeile, die die URL zum VCS angibt. Ist zwar meistens SVN, aber viele Projekte satteln mittlerweile auf GIT um.

Was RPM angeht habe ich absolut keine Ahnung ^^
 
Zuletzt bearbeitet:
Nebenbei: Ich würde immer Module bauen, wie man via CPAN verwalten kann. Das funktioniert ersten super gut und zweitens beschränkt man sich nicht zwangsweise auf eine Plattform.. eine wirre Idee einiger verpeilter Hacker war mal Software Plattformübergreifend zu gestalten.
 
@Serow

Am besten bestehende DEB-Pakete analysieren (hier: john). Sie bestehen größtenteils aus 1-zu-1 Abbildungen der Files im Dateisystem:

Code:
:~$ 
[B]sudo apt-get --download-only --reinstall install john[/B]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/180 kB of archives.
After this operation, 0 B of additional disk space will be used.
Download complete and in download only mode
:~$ [B]mkdir /tmp/john[/B]
:~$ [B]sudo dpkg -x /var/cache/apt/archives/john_1.7.8-1_amd64.deb /tmp/john/[/B]
Und das hier ist dann der Inhalt:
find /tmp/john/
/tmp/john/
/tmp/john/etc
/tmp/john/etc/cron.d
/tmp/john/etc/cron.d/john
/tmp/john/etc/john
/tmp/john/etc/john/john.conf
/tmp/john/etc/john/john-mail.conf
/tmp/john/etc/john/john-mail.msg
/tmp/john/usr
/tmp/john/usr/share
/tmp/john/usr/share/man
/tmp/john/usr/share/man/man8
/tmp/john/usr/share/man/man8/unique.8.gz
/tmp/john/usr/share/man/man8/unshadow.8.gz
/tmp/john/usr/share/man/man8/john.8.gz
/tmp/john/usr/share/man/man8/unafs.8.gz
/tmp/john/usr/share/man/man8/mailer.8.gz
/tmp/john/usr/share/doc
/tmp/john/usr/share/doc/john
/tmp/john/usr/share/doc/john/CONFIG.gz
/tmp/john/usr/share/doc/john/RULES.gz
/tmp/john/usr/share/doc/john/README.Debian
/tmp/john/usr/share/doc/john/FAQ.gz
/tmp/john/usr/share/doc/john/changelog.Debian.gz
/tmp/john/usr/share/doc/john/README.gz
/tmp/john/usr/share/doc/john/MODES.gz
/tmp/john/usr/share/doc/john/CREDITS
/tmp/john/usr/share/doc/john/OPTIONS.gz
/tmp/john/usr/share/doc/john/EXTERNAL
/tmp/john/usr/share/doc/john/EXAMPLES.gz
/tmp/john/usr/share/doc/john/copyright
/tmp/john/usr/share/john
/tmp/john/usr/share/john/cronjob
/tmp/john/usr/sbin
/tmp/john/usr/sbin/unique
/tmp/john/usr/sbin/mailer
/tmp/john/usr/sbin/unshadow
/tmp/john/usr/sbin/unafs
/tmp/john/usr/sbin/john

Greetz
Hackse
 
Zurück
Oben