summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
AgeCommit message (Collapse)AuthorFilesLines
2008-02-28Dpkg::Source::Archive/Package: misc fixes and changesRaphael Hertzog2-12/+48
* scripts/Dpkg/Source/Archive.pm: Replace unsafe rmtree() by the safer erasedir() function. * scripts/Dpkg/Source/Archive.pm (add_file, add_directory): Prefix filename with chdir when the directory of the tar process isn't the current directory. * scripts/Dpkg/Source/Package.pm (find_original_tarballs): New function to find original tarballs possibly associated to the current source package. * scripts/Dpkg/Source/Package.pm (add_file): Support adding file who are not stored in the current directory (or who are prefixed with "./"). * scripts/Dpkg/Source/Package.pm (can_build): New function to check if a source package build is likely to succeed given the constraints of a particular source package format. Will be used by dpkg-source to find an appropriate format.
2008-02-28* scripts/Dpkg/Source/Package/V1_0.pm: Cleanup and removal of unused codeRaphael Hertzog1-16/+9
2008-02-24Dpkg::Source::Package and Dpkg::Source::Package:V1_0: new modulesRaphael Hertzog2-0/+636
* scripts/Dpkg/Source/Package.pm: New module that represents a source package. It provides some common functions and is the base class from which real format of source packages must derive. The two main functions that subclass must implement are build($dir) and extract($dir). * scripts/Dpkg/Source/Package/V1_0.pm: Implementation of the Debian source package version 1.0, the current version in wide-spread use.
2008-02-24Dpkg::Exit and Dpkg::Source::Functions: two new modulesRaphael Hertzog1-0/+31
* scripts/Dpkg/Exit.pm: Enable to register some exit handlers that are called when a script is interrupted by a signal. * scripts/Dpkg/Source/Functions.pm: Contains some generic functions used by other Dpkg::Source::* modules. Only erasedir() for now.
2008-02-24Dpkg::Source::Archive/Patch: small tweaksRaphael Hertzog2-0/+3
* scripts/Dpkg/Source/Archive.pm (create): Offer possibility to chdir before calling tar. This is required to create tar achives that do not encode the full path to the location of the directory that we want to integrate. * scripts/Dpkg/Source/Patch.pm (apply): Make sure to remove POSIXLY_CORRECT while calling patch to avoid unexpected changes in his behaviour.
2008-02-22Rename Dpkg::Source::Archiver to Dpkg::Source::ArchiveRaphael Hertzog1-1/+1
2008-02-22Dpkg::Source::Patch gains last features from dpkg-sourceRaphael Hertzog1-5/+153
* scripts/Dpkg/Source/Patch.pm: New analyze() function that replaces dpkg-source's checkdiff(). Check sanity of patch, and reports directories to create and list of patched files. * scripts/Dpkg/Source/Patch.pm (apply): Create required directories on the fly and adjust timestamp of patched files. This behaviour is configurable. * scripts/dpkg-source.pl: Adjust accordingly. * scripts/Dpkg/Source/Patch.pm (add_diff_file): Support new option include_timestamp.
2008-02-22Dpkg::Source::Archiver/Patch: Rename close() methods into finish()Raphael Hertzog2-3/+3
* scripts/Dpkg/Source/Archiver.pm: Rename close() method into finish() to avoid ambiguity with CORE::close(). * scripts/Dpkg/Source/Patch.pm: Same. * scripts/dpkg-source.pl: Updated accordingly.
2008-02-22Dpkg::Source::Patch: New module to generate and apply patchesRaphael Hertzog1-0/+273
* scripts/Dpkg/Source/Patch.pm: New module that is able to generate patches (between files or between directories). It's also able to apply patches. Built on CompressedFile, it handles compression/decompression of patches files on the fly. It still lack some functionalities of dpkg-source (patch analysis and pre-creation of new directories before patch application). * scripts/dpkg-source.pl: Replaced big chunks of the code by some usage of Dpkg::Source::Patch. More to come later. * scripts/Makefile.am, scripts/po/POTFILES.in: Register the new module file.
2008-02-21Create Dpkg::Source::CompressedFile as spinoff of Dpkg::Source::CompressorRaphael Hertzog3-138/+178
* scripts/Dpkg/Source/Compressor.pm: Drom from this object all filename related code and move it ... * scripts/Dpkg/Source/CompressedFile.pm: ...here. This object is a named file and it handles either explicit compression (call to set_compression()) or implicit compression (compression type is guessed from the filename). It offers open_for_write() and open_for_read() to write into/read from a data stream that is compressed/uncompressed on the fly. * scripts/Dpkg/Source/Archiver.pm: Make it based on CompressedFile and simplify code. * scripts/dpkg-source.pl: Adapt code to the new interface of the Compressor object. * scripts/Makefile.am, scripts/po/POTFILES.in: register new file CompressedFile.pm.
2008-02-20Dpkg::Source: don't handle the compression level explicitelyRaphael Hertzog2-20/+18
* scripts/Dpkg/Source/Archiver.pm: Drop set_compression_level() and always use the default compression level (from Dpkg::Source::Compressor). * scripts/Dpkg/Source/Compressor.pm: New set_default_compression() and set_default_compression_level() to change the default values of those parameters. * scripts/dpkg-source.pl: Change the default compression and the default compression level globally. Replace forkgzipread(), forkgzipwrite() and reapgzip() by direct usage of Dpkg::Source::Compressor in a way that it inherits the compression level automatically. Also simplify some subprocess execution by using Dpkg::IPC::fork_and_exec().
2008-02-16Fix some whitespace oddities in the new modulesFrank Lichtenheld2-9/+9
2008-02-16Handling of compression level in dpkg-sourceRaphael Hertzog1-2/+6
* scripts/Dpkg/Source/Archiver.pm (create): Forward properly the compression level. * scripts/Dpkg/Source/Archiver.pm (extract): Correct parameters in an error message. * scripts/dpkg-source.pl: Take into account the compression level when generating a new tarball.
2008-02-16Dpkg::Source::Archiver: new module to work with tar archivesRaphael Hertzog1-0/+217
* scripts/Dpkg/Source/Archive.pm: New module handling tar archive creation and extraction. * scripts/dpkg-source.pl: Updated and simplified to use the new module. * scripts/Makefile.am: Add new modules to dist tarball. * scripts/po/POTFILES.in: Add new module in list of files to scan for translations.
2008-02-16Dpkg::Sourse::Compressor: add copyright noticeRaphael Hertzog1-0/+16
2008-02-16Dpkg::Compression: add get_compression_from_filename()Raphael Hertzog1-10/+6
* scripts/Dpkg/Compression.pm: Add function get_compression_from_filename() to identify the compression type from the file extension. Returns undef in case of failure. * scripts/Dpkg/Source/Compressor.pm: Simplify some code by using the new get_compression_from_filename().
2008-02-15Simplify Dpkg::Source::Compressor by using the extended fork_and_exec()Raphael Hertzog1-60/+38
* scripts/Dpkg/Source/Compressor.pm: Replace the multiple compress_* functions by a single compress() function that accepts the same parameters than fork_and_exec(). The exec parameter is replaced with the right compressor/decompressor invocation, and some other parameters have default values. Same for uncompress_* replaced by uncompress(). * scripts/dpkg-source.pl: Update accordingly to use the new syntax.
2008-02-15Dpkg::Source::Compressor: handle on-the-fly compressionRaphael Hertzog1-0/+169
* scripts/Dpkg/Source/Compressor.pm: This new module knows how to compress/uncompress streams of data. It supports all the compression types defined in Dpkg::Compression.
2008-02-11Dpkg::Source::VCS::git: Call git ls-files with -zFrank Lichtenheld1-7/+9
* scripts/Dpkg/Source/VCS/git.pm(prep_tar): Call git ls-files with -z to correctly handle filenames with funny characters.
2008-02-11Dpkg::Source::VCS::git: simplify read_git_configFrank Lichtenheld1-19/+8
* scripts/Dpkg/Source/VCS/git.pm(read_git_config): Simplify by setting $/ = "\0" instead of splitting on \n, which separates keys and values, but can also occour in the values themself.
2008-02-10Fix sourcev3 code to work with current dpkg-devFrank Lichtenheld1-35/+36
Use Dpkg::ErrorHandling and fix some other errors
2008-01-04use git foo instead of git-fooJoey Hess1-18/+18
Upcoming version of git will move the git-foo commands out of path
2007-10-10Merge branch 'master' of git://git.debian.org/git/dpkg/dpkg into sourcev3Joey Hess1-1/+2
Conflicts: man/dpkg-source.1 scripts/Makefile.am (manually resolved)
2007-10-06remove .git/gitwebJoey Hess1-0/+10
I don't think this is a security issue, but it has no business being distributed in debian source packages.
2007-10-06typoJoey Hess1-1/+1
2007-10-06improve an error messageJoey Hess1-1/+1
2007-10-06use git-config --nullJoey Hess1-19/+46
2007-10-06git-config --filename only needs a full path if not run from a git WCJoey Hess1-7/+5
2007-10-06import the VCS module so it can check if the VCS is availableJoey Hess1-0/+10
2007-10-06fix all commands that spawn a subshellJoey Hess1-72/+65
2007-10-05delete the reflogJoey Hess1-1/+5
Frank suggested that deleting the reflog would free some more space and maybe make the git-gc more efficient. There does not seem to be a way to do it using git-reflog expire, so use rm.
2007-10-05first pass of changes based on Frank Lichtenheld's reviewJoey Hess1-20/+19
changes to avoid shell exposure and maybe clean up the reflog still to come
2007-10-05move tardir creation into the prep_tar functionJoey Hess1-1/+3
It was annoying that the tardir was created even if the build failed due to uncommitted changes, this avoids that problem.
2007-10-05add a check for symlinks in .git to outside the source packageJoey Hess1-0/+15
This is run both at pack time and at unpack. At pack time, it would probably be accidentially building a package with a symlinkey .git that wouldn't unpack properly. At unpack time, such symlinks are generally not to be trusted (Although dpkg-source allows symlinks in packages' source, which are potentially also untrustworthy.. would make an interesting exploit.)
2007-10-04robustness fixesJoey Hess1-15/+22
(testing is good..)
2007-10-04support dpkg-source -i for overriding git WC cleanliness checkJoey Hess1-8/+33
2007-10-04improve detection and error for non-git-repo detectionJoey Hess1-2/+2
2007-10-04allow core.logallrefupdates in configJoey Hess1-2/+3
This is one of the standard settings and not something dpkg-source should complain about.
2007-10-04fix a typoJoey Hess1-1/+4
also added a todo item, I suspect that people will want a way to build with unclean trees
2007-10-04error out on repos that use git submodulesJoey Hess1-3/+18
Supporting git submodules will be fairly tricky, and I'm not planning to implement it at least until I see a use case for it.
2007-10-04remove the index fileJoey Hess1-1/+12
This saves (some) space and is also a paranoia measure since third parties don't normally swap index files around. It's recreated by git-reset.
2007-10-03sanitise .git/config.Joey Hess1-5/+44
The .git/config file is another file that is not typically pulled from untrusted parties. It might contain annoying, or even possibly security problimatic settings. Sanitise it using git-config so only options that are sure to be safe remain.
2007-10-03ignore GIT_ environment variablesJoey Hess1-0/+8
2007-10-03make uncommitted changes in the WC be an error, not a warning.Joey Hess1-2/+2
2007-10-03suppress part of the git-status outputJoey Hess1-1/+3
2007-10-03comment improvementsJoey Hess1-3/+21
2007-10-03git support now fully workingJoey Hess1-9/+30
Added code to clear executable bits from git hooks
2007-10-03add check for uncommitted files in git repoJoey Hess1-4/+27
This can be overridden by using -W.
2007-10-02firmed up todo items tnx madduckJoey Hess1-2/+3
2007-10-01updates, ignore more flags which don't make sense for vcsJoey Hess1-0/+1