dpkg-raw and debian/rules

15 views
Skip to first unread message

Stephen Ecker

unread,
Jan 9, 2025, 10:35:49 PM1/9/25
to isar-users
I am trying to make a package using dpkg-raw, because I don't need to compile anything... but I would like to add a hook to the rules.  Is there a good way to do this, or will I need to provide the entire debian/ directory?

What I am actually trying to accomplish is a call to add with update-alternatives.  Is there a builtin way to do this already, by chance?

thanks,
   stephen 

Jan Kiszka

unread,
Jan 10, 2025, 1:21:35 AM1/10/25
to Stephen Ecker, isar-users
On 10.01.25 04:35, Stephen Ecker wrote:
> I am trying to make a package using dpkg-raw, because I don't need to
> compile anything... but I would like to add a hook to the rules.  Is
> there a good way to do this, or will I need to provide the entire
> debian/ directory?

dpkg-raw used this:

https://github.com/ilbers/isar/blob/master/doc/user_manual.md#compilation-of-sources-missing-the-debian-directory
("Create rules file if sources does not contain a rules file")

What we are missing in our docs is a link from
https://github.com/ilbers/isar/blob/master/doc/user_manual.md#packages-without-source
to the debianize mechanism.

>
> What I am actually trying to accomplish is a call to add with update-
> alternatives.  Is there a builtin way to do this already, by chance?

However, update-alternatives is a postinst topic, nothing for rules as
the latter runs during package build while you want something after
package installation.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Stephen Ecker

unread,
Jan 10, 2025, 1:48:04 AM1/10/25
to Jan Kiszka, isar-users
Where would I put and/or reference the package maintainer scripts in the recipe to dpkg-raw?

Anton Mikanovich

unread,
Jan 10, 2025, 2:26:29 AM1/10/25
to Stephen Ecker, Jan Kiszka, isar-users
10/01/2025 08:47, Stephen Ecker wrote:
> Where would I put and/or reference the package maintainer scripts in
> the recipe to dpkg-raw?

Hello Stephen,

As dpkg-raw packages use deb_debianize logic, you can just create a script
named "postinst" (or postrm/preinst/prerm if also needed) in /files and
add it
to your recipe's SRC_URI list. Then it should be included into resulting
deb.

Reply all
Reply to author
Forward
0 new messages