Solved clamtk broken?

I went to do a virus scan on one of my internet facing computers and discovered that a recent upgrade broke my Clam AV GUI. security/clamtk
Here is the error.
Code:
kook@EC800A:~ # clamtk
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/ATTRS{ <-- HERE vendor}=="(.*?)"$/ at /usr/local/lib/perl5/site_perl/ClamTk/Device.pm line 225.
Compilation failed in require at /usr/local/bin/clamtk line 21.
BEGIN failed--compilation aborted at /usr/local/bin/clamtk line 21.

Suprised to see compilation errors. Anything I can do to fix this? Used packages to install. Only using packages. No ports.
I don't see a bug report and figured I would ask around before reporting this.
 
I deleted the package and refreshed my ports and it built cleanly. This appears to be a PERL module problem,
The offending line is: 225
usr/local/lib/perl5/site_perl/ClamTk/Device.pm
Code:
            # This is good for label stuff:
            if (/ATTRS?{vendor}=="(.?)"$/) {
                next if ( defined $hash{$f}{VENDOR} );
                $hash{$f}{VENDOR} = $1;
So I added the question mark after /ATTRS and it now goes further.
Is this a Linuxism? I had to do the same fix on one other field,{model}

Now I have to fix this next problem:
Code:
root@E6420:~ # clamtk
The encoding pragma is no longer supported at /usr/local/lib/perl5/site_perl/ClamTk/Submit.pm line 19.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/ClamTk/Submit.pm line 19.
Compilation failed in require at /usr/local/bin/clamtk line 26.
BEGIN failed--compilation aborted at /usr/local/bin/clamtk line 26.
 
So Submit.pm line 19 is this:
Code:
use encoding 'utf8';

What does this mean:
The encoding pragma is no longer supported
 
I just modified it to: no encoding;
Then had to modify /usr/local/bin/clamtk
Make RW to edit. Comment out encoding:
Code:
#use encoding 'utf8';
My first port fixed:
screenshot33.png
 
I built security/clamtk from ports and when and I gut when I run it:
Code:
clamtk
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/ATTRS{ <-- HERE vendor}=="(.*?)"$/ at /usr/local/lib/perl5/site_perl/ClamTk/Device.pm line 225.
Compilation failed in require at /usr/local/bin/clamtk line 21.
BEGIN failed--compilation aborted at /usr/local/bin/clamtk line 21.
 
That is exactly what I had. Try and edit these files like I did in the short term.
I contacted mat@ to see what I can do to get the port fixed up.

The problem exists for the ports and package.
The message is misleading. It is not a compile problem.
 
Here are my instructions for getting this going for now.

First edit this:
/usr/local/lib/perl5/site_perl/ClamTk/Device.pm
Change line 225 adding a question mark.
Code:
if (/ATTRS?{vendor}=="(.?)"$/) {

Change line 235 adding a question mark.
Code:
if (/ATTRS?{model}=="(.*?)"$/) {



Then edit this file:
/usr/local/lib/perl5/site_perl/ClamTk/Submit.pm
Change line 19 to:
Code:
use utf8;



Now change permissions to write to this file:
chmod +w /usr/local/bin/clamtk
/usr/local/bin/clamtk
Change line 29 to this:
Code:
use utf8;
Change it back to Read Only
chmod -w /usr/local/bin/clamtk

That's it. It should have created an icon under 'Accessories'. Try it now.
 
The message is misleading. It is not a compile problem.
Sure it is ;) Perl is compiled each time before execution, and that's what's failing here. But I agree this might be misleading.

I contacted mat@ to see what I can do to get the port fixed up.
Well, getting your changes applied automatically when building the port works by adding patches -- maybe give it a go and then submit a patch against the port in a PR :)
 
So when you call up a Perl module, Perl runs the script. Does it get compiled on the fly.
I always associate compiled code as binary. Is that a bad association?
 
I figured out the encoding part. The Perl directive changed from:
use encoding 'utf8';
to
use utf8;

So I changed my instructions to suit.

The warning was right there if I only knew what it meant.
"The encoding pragma is no longer supported"
It looks very logical after you figure it out.
 
Being a machinist the last thing I want to do is to pick up behind someones work. I like to start fresh.
So to write a PR, I needed to learn what goes on and the Porters Handbook has all that covered.
I decided to start my port work on this from scratch as this is my first attempt at porting any software.

My question is about the upstream project. The Sourceforge site for this software appears dead with the last release in 2013.
The author of the software has newer versions hosted on another site with a link to a github repository.
I am not sure if these would be considered official releases.
The author of clamtk is the same guy for 13 years. So I dunno if I should go asking questions or what.

The versions in ports is from 2013 but is the last version from the clamtk project on Sourceforge
Should I bother trying to bring this up to the newer version or just patch the old?
 
Thanks for that bash in the head. I was wondering what /SF meant.

What about PORTREVISION=4 (this was the old setting). So on a major version bump should it go to zero or one?
I am guessing it should be1 for: 5.25_1

I find it suprising that there are no check to see if the port exists already and no backup of old conf files.
 
Well if history is any guide it looks like the first port of a new upstream revision does not get a PORTREVISION at all?
Major version has nothing to do with it from my reading of the commits.
So PORTREVISION is only used if a version needs fixing up after first port of that version. Sound right?
 
5.2.3.1
PORTREVISION is a monotonically increasing value which is reset to 0 with every increase of DISTVERSION

My bad. I looked at commit version numbers instead of the book.
 
Yeehaw. I gots me a newfangeled GUI. Version 5.25 but I got problems with Gnome-Icons.
I have to switch my xfce4 >appearance >Icons> From Adwaita to GNOME.
screenshot35.png
 
With Adwaita Icons:
Code:
root@builder:~ # Icon 'gtk-new' not present in theme at /usr/local/lib/perl5/site_perl/ClamTk/GUI.pm line 285.

Starting at line #281 GUI.pm
Code:
    my $theme = Gtk2::IconTheme->new;
    for my $item ( @data ) {
        my $iter = $liststore->append;
        my $pix = Gtk2::IconTheme->get_default->load_icon(
                $item->{image}, 24, 'use-builtin'
 
I think I might just need to patch the path here to /usr/local/share/

Code:
    my $theme = Gtk2::IconTheme->get_default;
    $theme->append_search_path( '/usr/share/icons/gnome/24x24/actions' );
    $theme->append_search_path( '/usr/share/icons/gnome/24x24/places' );
    $theme->append_search_path( '/usr/share/icons/gnome/24x24/mimetypes' );
 
That was it. I now have a working application. Now I need to walk it back into the makfile.

I started that first, then pkg-plist, pkg-desc then distinfo.
Got fed up so I just manually copied everything to correct locations and started running the perl script, fixing errors until I had all the dependencies covered.
So now I need to refine the makefile and double check my dependencies.
Figure out how to patch the path issue above.
Might try a 32bit install-build just to make sure it works there too..
Then maybe quality testing and portlint.
If that goes good make a patch against the old version and then write the PR or phab?
 
Very nice. I was worried someone would beat me to this, but last reply was in January.
I will add a comment to avoid overlaping work. I need another 7 days to do it up right.
 
Back
Top