Debian Programming :: Editing Postinst In Existing Binary Packages
Oct 30, 2014
I have lately found myself setting up a number of PXE installation servers sufficient that I'm now inspired to automate the process. I've not done this before, but I think I've hit on a method to make it work. I'm using three packages from the archive as a basis: tptpd-hpa, isc-dhcp-server, and nfs-kernel-server. Up to now I've been installing these with APT, then modifying their configs (or creating same as necessary) and then copying my install files (pxelinux.0 and friends, with Debian Wheezy netinst and Xubuntu 14.04 menu options) into /srv/tftp. It strikes me that, rather than letting these packages' postinst scripts do a bunch of stuff that I will subsequently undo, I should modify the scripts in situ to do what I want. I don't feel that I adequately understand how these things work, so I'm asking for advice.
So far I've hit upon two different methods.
I can use apt-get download to fetch the packages, and then dpkg-deb --control to pull out the control files. Then I can edit the postinst scripts as necessary and dpkg-deb --build a new package from the results of dpkg-deb --fsys-tarfile plus the altered postinst scripts. I have gotten as far as extracting the control files from a package, but I'm unsure that the dpkg-deb --build step will work as I expect. Alternately I can do apt-get source [packages], edit the postinst scripts in the source, and then build the packages as usual. I'm more confident that this will work, but I'd rather provide the former method if possible. Is there another method of which I've not thought? Is this the way metapackages are made and configured?
View 2 Replies
ADVERTISEMENT
Feb 25, 2011
Trying to install Debian Sid in VMWareplayer....
Got image debian-testing-amd64-netinst.iso from : [url]
Following happens :
View 2 Replies
View Related
May 5, 2011
Is there any Linux utility to combine two or more binary files into a single binary file ?
View 7 Replies
View Related
Nov 30, 2010
How to coded version info and other information likes author and company name into the ELF binary?
I prefer the put the version info during build step.
View 5 Replies
View Related
Jun 24, 2010
I did the UPGRADE from Karmic Koala to Lucid, and everything was going well. But now I've been having problems with the UBUNTU UPDATE tool for the last 2 weeks. Every time I try to do an update check on the packages, I get the following message:Failed to fetch http:[url]....Release Unable to find expected entry deb-src/binary-i386/Packages in Meta-index file (malformed Release file?)
Some index files failed to download, they have been ignored, or old ones used instead.I've tried changing the servers to MAIN and others, and still no way to solve it. I've also checked for other posts, but haven't found a solution yet. Here's my SOURCES LIST (gksudo gedit /etc/apt/sources.list)# See http:[url].... for how to upgrade to # newer versions of the distribution.
View 3 Replies
View Related
Jan 12, 2014
What I would like to do is, with a right click, have the menu give me the option to run srm, which is a "secure remove" program. I picked this one as it requires not only a file name, but some other options. I've run into no support adding things to menus. When I updated one of the Debian versions, I lost the shutdown option from the name menu that used to be there. It was suggested that I right click and pick that option to restore it, but I get the same as the left button on that menu.
View 2 Replies
View Related
Feb 4, 2011
Very often we get to hear Binary / Source when we talk about installing packages...From what I understand "Binary" refers to a natively packaged installation by a Distro wheras installation from Source would entail fetching the files, Compiling and then building the package. When we say "source" where do these codes reside? Is it diffferent for different distros or one common source like "sourceforge.net" or similar?! I know it sounds silly but what is the origin of the source codes??
One general remedy if a package is not found is to install from source... So , source would refer to a "tar.gz" or "bz2" archive present at some location like "[URL]". In some cases , id it possible that some packageas are not available in "Source". When I tried to build a package for a particular distro , I was told that some dependencies are not un the source ...What is the meaning of this? So do all distros maintain the codes in their official repositories?
View 1 Replies
View Related
Mar 23, 2011
I have a brand new Slackware 13.1 x64 installation, and I'm having problems with slapt-get.
I'm unable to upgrade existing packages or install new ones. The output in terminal is:
Code:
bash-4.1# slapt-get -i tar
Reading Package Lists... Done
The following NEW packages will be installed:
tar
[Code]....
Worth mentioning also, I managed to install Gnome from [URL] without any problems immediately prior to this error message starting to appear.
I've been using Debian and Ubuntu derivatives for the last couple of years, so I'm comfortable using the terminal and possibly doing some more advanced stuff.
View 4 Replies
View Related
Aug 6, 2011
The Payment Card Institute (PCI) is requiring our site to upgrade to the latest versions of Apache, Mysql, OpenSSL, and PHP to fix known bugs that can compromise securityI can build all these from source, but when I do "make install" they don't mimic at all what is installed (directory format, files, etc) when I do apt-get install (of whatever old versions are in the dist).How can I find out how the packages are build via configure/make so that I can replicate the files, directory structure, etc, just with the current versions.
View 9 Replies
View Related
Aug 25, 2015
I have 32-bit Debian 8 and am trying to install Vmime [URL] .....
apt-get cannot locate these packages:
apt-get install vmime0
apt-get install libvmime-dev
I have an issue raised on Vmime's Github page too [URL] .....
View 1 Replies
View Related
Jan 2, 2010
I'm trying to upgrade from 8.04 to 9.10 via 8.10 etc. When I run update manager, I get this:
W:Failed to fetch [URL] Unable to find expected entry universal/binary-i386/Packages in Meta-index file (malformed Release file?), E:Some index files failed to download, they have been ignored, or old ones used instead.
and then it closes. I've unselected all the third party packages and tried various servers, but no difference. I can wget the file, but when I look at it I see entries for "universe/binary-i386/Release", but nothing for "universal" .
View 4 Replies
View Related
Apr 15, 2010
Running first upgrade after installing 9.10.
Currently on item "Configuring linux-image-2.6.31-20-generic" and the progress bar/terminal readout has not changed for an hour or so I'd say.
Don't want to cause issues by killing it halfway through, especially as it presents an opportunity to learn something!
View 2 Replies
View Related
Feb 21, 2011
I am learning C++ and wish to include some Boost functions in my code. My machine is running Debian Linux with the pre-installed boost binarys.I have a couple of questions:How do I include the library in my C++ code as there are no cpp or h files only binary files (eg /usr/lib/libboost_regex-d.so and /usr/lib/libboost_regex-d.a)How do I comile the code. I am using DialogBlocks for creating forms using wxwidgets. The editor also compiles the code using the gcc compiler. Do I have to give an instruction to the compiler saying which file is requried and where to find it? If so, any ideas how this is done?
View 4 Replies
View Related
May 4, 2011
I have written a c program. And compiled it to make a binary. Now when i try to call this binary from php page, it is not being executed.
View 14 Replies
View Related
Aug 4, 2010
i have some files name libbeet.so.3.02 , libpos.so.3.04.I think all is binary files , but i am not able to see the contain of file.is there any script to read the file contain.
View 5 Replies
View Related
May 1, 2010
I have a binary value which I receive from a controller. Say this binary value is 42. Just plain hex 42. If you would look at that byte in a debugger you would see 42.Now this value hold 8 bits each indicating a high or a low output. So 0x42 = 01000010b. Which means bits 1 and 6 are '1'.When I would want to find out which bits are set and which are not in a language like C, I simply do:
Code:
mask = 0x80;
if (binval & mask) {...}
etc..
However I am programming in TCL, and I try to do:
Code:
set mask 0x80
if { [expr ($binval & $mask) > 0] } {...}
etc...
this fails. At the moment the expr is executed, $binval is evaluated and substituted so the expression I am evaluating is
Code:
set mask 0x80
if { [expr ('B' & '0x80') > 0] } {...}
etc...
Eventually I got it working by converting the $binval into a '0x42' string value, like this:
Code:
binary scan $binval c byte
set byte [format "0x%0x" $byte]
set mask 0x80
if { [expr ($byte & $mask) > 0] } {...}
etc...[
Then the expression yields what I want. But this seems so stupid and clumsy. Isn't there a better way where I can compare two binary values without conversions?
View 14 Replies
View Related
Jul 22, 2010
I have just installed Debian Lenny and was trying to upgrade the installed packages from the packages.debian.org site. when i asked synaptic to add the downloaded packages the would not appear, but when i checked the .xsessions file there are entries saying that the packages were being ingnored because they were either different versions, the MD5 did not match or even "can't find pkg". i have to use the local library to download the packages because i dont have an internet connection at home.
[Code]...
View 6 Replies
View Related
Nov 4, 2010
I am looking to use PAR:acker to convert perl to some executable in Windows. Just wondering if there is an easy way (say a binary download) is available ?
CPAN has the code but I want to save sometime if possible.
View 6 Replies
View Related
Jan 28, 2010
I get this error when I run the program that i created using eclipse.How to fix this?
View 3 Replies
View Related
Feb 11, 2011
I'm trying to compile a simple script for a ar71xx (bleeding edge /from snapshots) Openwrt router.I have previously compiled scripts for Kamikaze 8.09. I just copied the gcc file inside the SDK dir and used it without problems.
View 4 Replies
View Related
Jul 14, 2010
it is about 'strings' binary from binutils. I recently wanted to test what it does and how it works. The best I did was this:
Code:
#!/bin/sh
PROGRAM="
int main()
{
[code]....
Ok, from the output I don't get it.Can someone show me in a simple script, what is 'strings' good for ?
View 10 Replies
View Related
Aug 11, 2010
i need to change a binary file, let's say to find and replace username:
find string: "/home/name/bla-bla-bla/ "
new string: "/home/anewname/bla-bla-bla/ "
i can do it, for example, in emacs (hexl-mode), but interesting in writing a script instead. it will be much more better for me if i could do it automatically. is there an analog of: sed 's/string1/string2/g' ? P.S. the best way is to recompile the binary files i have, but there are no sources available.
View 5 Replies
View Related
Jul 16, 2010
I've got a bit of an obscure question for you to test your brains a wee bit. I'm trying to implement a search program to find areas of high density in a binary string.
E.g.
Code:
[0001001010
0001110001
0000001000
1001000010
0101100100]
Where density is the number of 1's / number of digits with a maximum number of digits being the current number in a buffer (in this example 50). So for the example the density for the whole buffer is 15/50. But the density of Buffer[14..20]=[1110001]=4/7. So if looking for areas of density = 1/3 it would find the longest sequences of density over 1/3.So in the example. Buffer[4..9]=[100101]=3/6=1/2 which is above 1/3 but it is within the Buffer[4..48]=[100101000011100010000001000100100001001011001]=15/45=1/3
View 5 Replies
View Related
Apr 15, 2011
I want to be able to disassemble a binary file, modify the assembly source, then assemble the modified assembly source back into a modified binary file. Purpose for this is pretty much just to play around with the Crackmes (www.crackmes.de) game.
Now, disassembly is easy, there are several tools that do it, including the standard objdump with the -d argument. However, how would you assemble an assembly source file created with objdump -d? GCC for sure doesn't want to assemble it in that format. What program, script, or arguments to GCC (none that I can think of) can be used to accomplish this? If someone also has some good tips for tools in general for Crackmes beyond what is standard in GNU/Linux I'd love to hear about it.
View 10 Replies
View Related
Apr 28, 2010
compile binary package for bash script?
View 2 Replies
View Related
Mar 5, 2010
My hosting server does not allow exec() or system() calls, for security reasons. I can call a cgi process in two ways. From a .shtml page, i can issue a directive like code...
View 11 Replies
View Related
Jul 2, 2010
I am currently implementing an upgrade system for silent upgrades in my application. I am stuck. I need the code to patch binary files. But I can't find a good third party library. My code is in C# so I would prefer a C# library, but right now I would even go as far as using a library in another language and bind it into my C# code. But I just can't find a good patch/diff library. I must be missing something. Surely there must be some libraries out there that give us the ability to patch binary files?
View 8 Replies
View Related
Jan 9, 2011
I have a binary file, which I need to process using my C++ application. Only thing I know is first chunk of the file is long, second chunk is int, third chunk is char etc... The binary file actually contains something like below. (which is represented in hex base).
D7 07 00 00 00 00 00 00 37 18 00 00 DE 07 ............ so on.....
I need to procees the file in the following way.
* I know the first data segment in my file is long. So it takes 4 bytes.
* so I need to read the first four bytes. That is D7 07 00 00.
* Then I need to reverse this as 00 00 07 D7.
* Finally I need to get the decimal value of above hexa decimal line. ( 00 00 07 D7)
* i.e. 00 00 07 D7 (in hex) = 7D7 (in hex- after removing leading 0 s) = 2007 (in decimal)
Like wise I need to process the whole file.
View 14 Replies
View Related
Nov 29, 2010
I am coding a http server which has to send the file(s) such as images, .avi files, .mpeg, that the client is going to request. I have been trying of sending files through sockets.
char info [256];
bzero(info, 256);
//memset(&info,0,sizeof(info));
read(socket, info, 255);
write(socket, HTTP, 255);
FILE *fl= fopen(info,"rb");
fseek(fl, 0, SEEK_END);
long len = ftell(fl);
printf("largo: %ld", len);
unsigned char *ret = (char*) malloc(len);
fseek(fl, 0, SEEK_SET);
fread(ret, 1, len, fl);
However, it's supposed to be shown in Mozilla Firefox (as the client). But it is not doing it, so.. It's just not getting the complete file.
View 1 Replies
View Related
Mar 23, 2011
I'm searching for an algorithm to sort a binary min heap tree. That's when in root i have the smallest value in the tree. The only restriction it has, is that the parent must be smaller the its two children. i think something like quick-sort, but i don't know how to implement it.
View 8 Replies
View Related