Closed shlomif closed 4 years ago
@xtaran : hi! I made a lot of progress in this branch: https://salsa.debian.org/shlomif-guest/wml/-/commits/shlomify4 and this script: https://github.com/shlomif/fortune-mod/blob/docker-build-debian-website-meta-lang-package/scripts/debian-packaging/docker-test.pl . The changes and git history are quite ugly, but it is just a proof of concept.
Seems to be mostly working now.
Thanks! Will have a look into it, but probably no more today.
I tried restoring the SliceTermParser.pm too
Did I remove that from the Debian package by accident?
but dpkg-source did not approve.
Yeah, dpkg-source
doesn't like if you change upstream code directly. Just ignore building the source package. I'll take care of that. Just use dpkg-buildpackage -b
and if that works again, I'm happy!
Thanks for the help!
Hi @xtaran !
I tried restoring the SliceTermParser.pm too
Did I remove that from the Debian package by accident?
It was present in wml_backend/p9_slice
and was not installed into the test installation.
but dpkg-source did not approve.
Yeah,
dpkg-source
doesn't like if you change upstream code directly. Just ignore building the source package. I'll take care of that. Just usedpkg-buildpackage -b
and if that works again, I'm happy!
I managed to fix that, and now the build, test and packaging is working (modulo some lintian/etc. warnings).
Thanks for the help!
@xtaran ; hi, ping! Any idea?
Sorry, quite busy at work these days. Haven't found time for it yet.
Sorry, quite busy at work these days. Haven't found time for it yet.
OK, thanks for the update.
Working on it now.
I made a lot of progress in this branch: https://salsa.debian.org/shlomif-guest/wml/-/commits/shlomify4
Thanks again for your work on this. Your help is really appreciated.
The changes and git history are quite ugly,
Indeed. :-)
but it is just a proof of concept.
Will try either get the essence out of your changes or squash all your changes in one commit. Will see. (Probably the former.)
I tried restoring the SliceTermParser.pm too
Did I remove that from the Debian package by accident?
Not by accident but on purpose. And that brought me onto the right track…
Since slice
so far is a separate (source and binary) package in Debian, the file SliceTermParser.pm
is not in the wml
source package but in the slice
source package (and named slice_term.pl
there). The fact, that it is tried to being used at all despite the whole p9_slice
is not in the wml
source package in Debian (on purpose), led me to the following question:
Am I right that since approximately WML 2.20.x, slice is no more called by wml
as program slice
but just by calling a function inside the according Perl modules (via wml_include/TheWML/Backends/Slice/Main.pm
)?
If so, I guess, it is time to build the binary package slice
from the wml
source package. At least the slice.pl
file is still being generated so that slice
still can be used standalone. (I used slice for quite a while in my .Xsession
to generate config files depending on the hardware the X session is running on, but replaced it with a simpler script more tailored towards that use case at some point.)
BTW: Does this also apply to any other backends shipped in Debian separately? Currently this is the case with these backends:
wml_backend/p2_mp4h
wml_backend/p3_eperl
wml_backend/p4_gm4
wml_backend/p9_slice
I guess, it is time to build the binary package slice from the wml source package.
Yep, this is it! Thanks again for the right hint! Have a passing test suite now again!
Working now on splitting off the splice
binary package from the wml
package.
Finally the master branch of https://salsa.debian.org/debian/wml builds again. Still need to complete the slice package separation and to import the most recent upstream release.
Working on it now.
Thanks! Sorry for the delayed reply.
I made a lot of progress in this branch: https://salsa.debian.org/shlomif-guest/wml/-/commits/shlomify4
Thanks again for your work on this. Your help is really appreciated.
You're welcome.
The changes and git history are quite ugly,
Indeed. :-)
but it is just a proof of concept.
Will try either get the essence out of your changes or squash all your changes in one commit. Will see. (Probably the former.)
Thanks!
I tried restoring the SliceTermParser.pm too
Did I remove that from the Debian package by accident?
Not by accident but on purpose. And that brought me onto the right track…
Since
slice
so far is a separate (source and binary) package in Debian, the fileSliceTermParser.pm
is not in thewml
source package but in theslice
source package (and namedslice_term.pl
there). The fact, that it is tried to being used at all despite the wholep9_slice
is not in thewml
source package in Debian (on purpose), led me to the following question:Am I right that since approximately WML 2.20.x, slice is no more called by
wml
as programslice
but just by calling a function inside the according Perl modules (viawml_include/TheWML/Backends/Slice/Main.pm
)?
Yes, I am "require"ing it and calling it here:
sub pass9
{
my ( $_pass_mgr, $opt, $from, $to, $tmp ) = @_;
# First check whether a shebang line is found and no
# output files were assigned on command line.
# This is needed to unprotect output files.
if ( !@{ $_pass_mgr->_opt_o } )
{
local @ARGV = @{ $_pass_mgr->_read_slices($from) };
if (@ARGV)
{
$_pass_mgr->out_istmp(0);
$_pass_mgr->_process_argv_cb->($_pass_mgr);
$opt = $_pass_mgr->pass(9)->opt_pass;
}
}
# slice contains "package" commands and
# other stuff, so we cannot source it.
return $_pass_mgr->_generic_do(
{
pass_idx => 9,
EXE => 'wml_p9_slice',
opt => $opt,
from => $from,
to => $to,
cb => sub {
require TheWML::Backends::Slice::Main;
return TheWML::Backends::Slice::Main->new( argv => [@_] )->main;
},
}
);
}
This is more idiomatic Modern Perl and may be somewhat faster than the previous scheme of slurping the code from the file and evalling it.
If so, I guess, it is time to build the binary package
slice
from thewml
source package. At least theslice.pl
file is still being generated so thatslice
still can be used standalone. (I used slice for quite a while in my.Xsession
to generate config files depending on the hardware the X session is running on, but replaced it with a simpler script more tailored towards that use case at some point.)
Yes.
BTW: Does this also apply to any other backends shipped in Debian separately? Currently this is the case with these backends:
* `wml_backend/p2_mp4h`
I reworked mp4h's C code somewhat but I call it using a separate process from the wml
frontend.
* `wml_backend/p3_eperl`
This is also called separately (as it is in C)
* `wml_backend/p4_gm4`
Here I search for "gm4" with a fallback on "m4" and calling them:
Note: all of these are written in C so not easy to embed in perl5 code.
* `wml_backend/p9_slice`
This was extracted into perl modules and embedded as it is mostly pure-Perl code.
Working on it now.
Thanks! Sorry for the delayed reply.
Hey, I was the one who was lagging with replies. :-)
Am I right that since approximately WML 2.20.x, slice is no more called by
wml
as programslice
but just by calling a function inside the according Perl modules (viawml_include/TheWML/Backends/Slice/Main.pm
)?Yes, I am "require"ing it and calling it here
Thanks for the confirmation.
This is more idiomatic Modern Perl and may be somewhat faster than the previous scheme of slurping the code from the file and evalling it.
Sure.
BTW: Does this also apply to any other backends shipped in Debian separately? Currently this is the case with these backends:
wml_backend/p2_mp4h
I reworked mp4h's C code somewhat but I call it using a separate process from the
wml
frontend.
I see, so this is a potential candidate to also build from the wml
source package, but not necessary immediately as it probably still builds fine with the external mp4h
. It though would be nice to get your improvements.
wml_backend/p3_eperl
This is also called separately (as it is in C)
Similar here, but probably even less urgent.
wml_backend/p4_gm4
Here I search for "gm4" with a fallback on "m4" and calling them:
Ah, right, forgot that this is actually just m4
and you surely don't want to maintain a copy of it as it's widespread elsewhere (and IIRC more or less actively maintained), too.
Interesting writeup. I though dislike the "solution" with the gmake
for Debian. I'd rather try to port my Makefiles to make them compatible with FreeBSD's make
, too. (On the other hand, there's also NetBSD's make
in Debian as bmake
, formerly pmake
.)
Note: all of these are written in C so not easy to embed in perl5 code.
Right.
You can close this issue now. I just uploaded wml 2.28.0~ds1-1 to Debian Unstable. :-)
(The ~ds1
stands for "Debian Source" because I still remove some embedded code copies from the tar ball.)
You can close this issue now. I just uploaded wml 2.28.0~ds1-1 to Debian Unstable. :-)
(The
~ds1
stands for "Debian Source" because I still remove some embedded code copies from the tar ball.)
Thanks! I'll wait for this page to reflect this change: https://packages.debian.org/source/sid/wml . "It ain't over till the fat lady sings."
Hi @xtaran !
Working on it now.
Thanks! Sorry for the delayed reply.
Hey, I was the one who was lagging with replies. :-)
Heh, maybe. We can all strive for improvement.
Am I right that since approximately WML 2.20.x, slice is no more called by
wml
as programslice
but just by calling a function inside the according Perl modules (viawml_include/TheWML/Backends/Slice/Main.pm
)?Yes, I am "require"ing it and calling it here
Thanks for the confirmation.
YW.
This is more idiomatic Modern Perl and may be somewhat faster than the previous scheme of slurping the code from the file and evalling it.
Sure.
BTW: Does this also apply to any other backends shipped in Debian separately? Currently this is the case with these backends:
wml_backend/p2_mp4h
I reworked mp4h's C code somewhat but I call it using a separate process from the
wml
frontend.I see, so this is a potential candidate to also build from the
wml
source package, but not necessary immediately as it probably still builds fine with the externalmp4h
. It though would be nice to get your improvements.
It should work fine with the older mp4h, yes. From what I seem to recall, most of my changes were either switching the build sys to cmake, removing no-longer-relevant portability checks and #ifdef
s , and some small cleanups.
wml_backend/p3_eperl
This is also called separately (as it is in C)
Similar here, but probably even less urgent.
wml_backend/p4_gm4
Here I search for "gm4" with a fallback on "m4" and calling them:
Ah, right, forgot that this is actually just
m4
and you surely don't want to maintain a copy of it as it's widespread elsewhere (and IIRC more or less actively maintained), too.
Yes. Note that I had issues using the native FreeBSD m4 instead of GNU m4 on fbsd with wml, so I first check for gm4
.
Interesting writeup. I though dislike the "solution" with the
gmake
for Debian. I'd rather try to port my Makefiles to make them compatible with FreeBSD'smake
, too. (On the other hand, there's also NetBSD'smake
in Debian asbmake
, formerlypmake
.)
Well, I'm using quite a few GNU make-specific features in my websites' build systems and elsewhere for this to be easy (even if desirable). The shlomifish.org main makefile is a 1,145 lines monstrocity and has several generated includes. Limiting myself to POSIX-only make features may make it even harder to main.
I've been contemplating trying to transition to using Ruby rake or similar ( https://www.shlomifish.org/open-source/resources/software-tools/#build ) but I'm not sure they'll be an improvement (I don't have enough familiarity or experience with them).
Note: all of these are written in C so not easy to embed in perl5 code.
Right.
Yay! The Eagle... err "Wamle" has landed in Debian sid:
@xtaran : (and all) thanks for everything. Closing as FIXED.
Here is my progress so far. With this docker script (note the branch and the commit), I am getting this "before" output:
And with this patch in the repo:
The output is better:
I tried restoring the
SliceTermParser.pm
too butdpkg-source
did not approve.wml-debian-after-1.txt wml-debian-before-1.txt
@xtaran : any idea? can you tell me how to restore the missing files to the git repo?