Makepkg and incorrect file extension of the source archive

Hi,
I want to create a PKGBUILD for a program distributed as a .tar.gz source archive, except that it's really a .tar archive.
Thus, makepkg fails because it uses the wrong tar option.
Now I'm wondering what the best way is to deal with this situation. I just tried placing a "mv foo.tar.gz foo.tar" line before the build() function, but that didn't get executed. Inside build() would be too late, because makepkg runs it after extracting.
I'm not looking for a solution on how to install it -- I can just manually download and rename the file, then edit the PKGBUILD accordingly. But the PKGBUILD resp. makepkg should cope with that, not the user by manually downloading/renaming things. So I'm looking for a way how to do that from inside that file.
Guess I should do a feature request: makepkg should detect the archive file correctly (e.g. using "file"), not just by looking at the extension which could be wrong.

tomk wrote:
Best solution in the long term is, of course, to ask the developers to correct their mistake.
In the meantime, although it's not ideal, there is no problem with running tar xf inside the build() function.
the problem is, he can't. Makepkg barfs when it cant untarball it.
In the meantime, download the source, and untar it in the build() function.
Also file a bug, maybe makepkg should use some 'file' (man file) magic to determine what it is.
James

Similar Messages

  • Jars and .class files - security of the source code

    Hi,
    I have an app that is in a jar file with the .class files (so no source code).
    I'm wondering how difficult it is to attain the source code from these .class files in my jar? Looking through the contents of the .class files it seems there is a large amount of readable text. For example I see method names, variables, etc.
    This leads me to believe these jars are not secure. What is a better way?
    Thanks!
    Edit:
    Looking around, I've noticed many java decompilers and Sun even supports a dissembler - javap. I think this is not cool, haha.
    What way can I protect my code? To me, the value of java just went way down due to the ease at attaining source code (based on what I read in the past hour or so. I have yet to try it myself). I wonder if this impacts companies reasons not to use java?
    Edit 2:
    I heard that there may be a way to make the jar closed, so you can't say, use winrar, to extract the class files. Does anyone know anything about this?
    Message was edited by:
    dayrinni
    Message was edited by:
    dayrinni

    Hi,
    I have an app that is in a jar file with the .class
    files (so no source code).
    I'm wondering how difficult it is to attain the
    source code from these .class files in my jar?
    Looking through the contents of the .class files it
    seems there is a large amount of readable text. For
    example I see method names, variables, etc.
    This leads me to believe these jars are not secure.
    What is a better way?
    Thanks!
    Edit:
    Looking around, I've noticed many java decompilers
    and Sun even supports a dissembler - javap. I think
    this is not cool, haha.
    What way can I protect my code? To me, the value of
    java just went way down due to the ease at attaining
    source code (based on what I read in the past hour or
    so. I have yet to try it myself). I wonder if this
    impacts companies reasons not to use java?All intellectual property stored in electronic form is vulnerable. Not just Java bytecode. You can use tools called obfuscators to make decompiling more difficult, which is usually good enough. The truth is, no matter how great you think your code is, it's of a lot less interest to others than you actually think. Unless you've got a particularly sexy argorithm or something, it's not really worth worrying too much about
    All you can do is make it more difficult for people to crack things, never prevent it. True of all languages, all electronic media

  • Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file [help]

    Hi,
    I have a excel file that I have been using since beginning of year.
    Yesterday, I tried to open it but a message comes out "
    Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
    After I click yes, the page is blank. The file is about 400kb in size.
    I have try open and repair and third party repair program and not working also.
    I would appreciate a lot if you can help me.
    Thank you very much.

    Per your post, this problem might be caused by malware on the affected machine.
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
    In order to clean your machine, run Microsoft Safety Scanner (http://www.microsoft.com/security/scanner/en-us/default.aspx) to kill the malware, and then repair Excel file itself.
    If this is not the case, feel free to post back and let me know. Thanks.
    Tony Chen
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • UDF to capture the source file name or the source folder for mapping

    Hi All,
    i have 2 files -  File1 from File2 from 2 different folders- single comm channel FTP (FCC). i have to pass a constant A and B respectively to a field in target structure.
    my options are -
    either create a new field in source str populating different constants and  then map to the target str
    or a udf to get the source file name or the source folder so that i can map the constant using the value mapping/FixValue mapping.
    please suggest. thanks.
    rajib

    Hi,
    please use the UDF to determine the file name. Then based on file name either pass A or B to your target field.
    The code is as given below. Just tweak the code to pass either A or B as per your requirement.
    public String G_GetFileName(Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards,
    Deepak.

  • IPhoto 11 and Picture file extensions

    Since upgrading to iPhoto 9.2.1, I've noticed that after importing, iPhoto no longer displays the picture's file extension below the pic, or in the information window.  All my files have a .CR2 extension when they are imported.  All pictures that were in the iPhoto llibrary, prior to upgrade to 9.2.1, display their file extensions below the pic, and in the information window.
    I've not been able to locate a preference that allows me to display the file extension in iPhoto...  Is it no longer possible to see the file extension in this version of iPhoto?
    Thanks,
    Bob

    I have connection issues with my AppleTV and it seams to disconnect routinely.  I haven't used it much and am trying to resolve that issue as well.  Separate from that, how do you interface directly with AppleTV.
    And by the way Bob, I'm at the point where I am rebuilding my files via another post...  Currently on step 1, and if that doesn't work, I'm going to export the entire library to a folder and then group it by file type to narrow down and change the format via preview and replace the files deleting the originals.
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
    If #1 fails continue with:
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.

  • PE 9 - Why is my exported file larger than the source?

    Hello
    I am new to Adobe Premier Elements 9. I have a Digital Video Recorder connected to my television. It produces MPEG-2 TS VIDEO FILEs. I want to import these into PE9 and just cut out the ads.
    I tried with a source file that is 1GB in size. I imported it and removed the ads but when I export it using Share > Computer and select settings that mimic the source I stll end up with a 3.7GB file. I thought it should be smaller that 1GB because the video is now about 5 minutes shorter.
    In my Export settings I chose:
    Multiplexer: TS
    Audio: Left it untouched
    Video:
    Basic Video Settings:
    Quality = 4
    Everything else set to Automatic (based on source)
    Render at Maximum Depth left unchecked
    Bitrate Settings:
    Encoding: VBR, 1 Pass
    Bitrate Level - Custom
    Min, Target and Max all set to 15
    GOP Settings:
    M Frames: 3
    N Frames: 12
    Is my DVR better at encoding/compressing video that PE9 or are my export setting wrong? Shouldn't the exported file be less that 1GB?

    As Steve points out, there are two parameters, that affect File Size:
    Duration
    Bit-Rate
    With a fixed Duration, the only way to adjust File Size is lower the Bit-Rate (lower Bit-Rate = smaller File Size, but at the expense of quality.
    Now, some CODEC's will allow one to use a lower Bit-Rate, but still retain perceived quality, better than some others, but it is still the Bit-Rate, that affects the File Size.
    Some Export/CODEC options will list the Bit-Rate directly, and MB/sec., where others will instead have a "quality" setting, and the Bit-Rate's MB/sec. will not be directly shown, but will relate to some quality setting.
    One major consideration is what is to be done with the resulting output file. If it is to be used for additional editing, then I feel that File Size is not a big issue, as I want the ultimate quality. If one is delivering the output file, then there are many considerations, from the platform of the recipient's computer, to the player being used, to the necessary quality of the file.
    Good luck,
    Hunt

  • Is any way search REMOTE VIEW of a web folder(files on server), the source code(all soite search) fo

    Is any way search REMOTE VIEW of a web folder(files on server), the source code(all soite search) for a word eg an email address? how?
    I must await a lot to finish?

    I search all Local View (site) for forms submitted to [email protected] and deleted that email although I still get SPAM(Nothing in body) emails sent to:
    [email protected]; [email protected]  (to both in TO field)
    first is the normal address left no need deleted, the yahoo address deleted.... well where this form processor located and get spam[PHP Site]...???
    I run SELECT NEWER IN REMOTE SITE
    But nothing selected, well?

  • How to set default file extension in the FileChooser?

    We are trying to use the FileChooser but for some reason, it doesn't have any file extensions in the drop down menu (like in windows). Does anyone know how to put this in?
    Also, how do we set the file name for the saving file, rather than typing the name in ourself?
    Also, how do we position the file chooser dialog in the middle of the screen? Right now, it's in the top left corner of the screen.
    Here's our piece of code, used for saving file.
    FileChooser fileChooser = new FileChooser();
            File file = fileChooser.showSaveDialog(stage);
            /*User might clicked on the cancel button*/
            if (file != null) {
                try {
                    Writer output = new BufferedWriter(new FileWriter(file));
                    output.write(text);
                    output.close();
                } catch (IOException ex) {
                    logger.error("save file error", ex);
            }Any help would be appreciated! Thanks!

    867511 wrote:
    We are trying to use the FileChooser but for some reason, it doesn't have any file extensions in the drop down menu (like in windows). Does anyone know how to put this in?Have you read the API? What's the nested class of FileChooser that's listed immediately after it in the classes list?
    Also, how do we set the file name for the saving file, rather than typing the name in ourself?I don't see any API for that. You could file a RFE on kenai.
    Also, how do we position the file chooser dialog in the middle of the screen? Right now, it's in the top left corner of the screen.I don't see any API for that either.
    db

  • I wonder if there is an application to uninstall a logiciel and all files related to the same thanks.

    I wonder if there is an application to uninstall a logiciel and all files related to the same thanks.
    Bruno Vasques

    Another option:
    AppDelete

  • Read lines from more than 1 file of different file extensions, extract the data and output to screen

    Hi,
    I am trying to read data from more than one file at once. The files are different types e.g. one is a text file one is an xml file like so, StudentInformation.txt, CollegeInformation.xml. The files are all stored in one place, in this case on the D drive of
    a local computer. I am trying to locate any files in the D drive with a file extension of .txt or of .xml (there may be more than two of these files in the future, so I'm trying to allow for that). Then I want to open all of these files, extract the information
    and output all the information in one display window. I want all the information from these two or more files to be displayed together in the display window.
    Here is the code so far. It is throwing up errors.
            //Load from txt or xml files
            private void btnLoad_Click(object sender, RoutedEventArgs e)
                    IEnumerable<string> fileContents = Directory.EnumerateFiles("D:\\", "*.*", SearchOption.TopDirectoryOnly)
                    .Select(x => new FileInfo(x))
                    .Where(x => x.Extension == ".xml" || x.Extension == ".txt")
                    .Select(file => ParseFile(file));}
                    private string ParseFile(FileInfo file)
                        try
                            using (StreamReader sr = new StreamReader(file.FullName))
                                string line;
                                while ((line = sr.ReadLine()) != null)
                                    //Logic here to determine if this is the correct file and append accordingly
                                    lbDisplay.Items.Add(line);
                                return line;
                        catch (Exception ex)
                            // Let the user know what went wrong
                            MessageBox.Show("The file could not be read: ");
                            MessageBox.Show(ex.Message);
    The error it throws up is:
    Error 1
    'BookList.MainWindow.ParseFile(System.IO.FileInfo)': not all code paths return a value

    This is the Small Basic programming language so moving to a C# forum.
    But you need all paths to return a value, including if an exception is called and it jumps to the catch, perhaps just:
    // Let the user know what went wrong
    MessageBox.Show("The file could not be read: ");
    MessageBox.Show(ex.Message);
    return "";

  • How do I read properties file kept in the source folder in weblogic workshop

    I want to have a log.properties file in the folder of the source java code which
    is reading this properties file. When I build the code the properties file also
    should go with the generated .class files.
    I am using class.getResourceAsStream("log.properties")
    I tries different ways to make the class to read the file, but it failed to find
    the properties file. Is there any way to keep the configuration files in the same
    directory of the source java code ? This is the problem of weblogic workshop 8.1.
    This thing runs fine in Tomcat.

    Did you try and add the path where the .properties file is located in the CLASSPATH?

  • Inconsistent and incorrect file icons in finder window list view

    I have been seeing incorrect file icons in finder windows noteably for PDF files the last couple of weeks on my office MacMini running 10.5.8. Some just look messed up. Some switched and looked like Evernote files, but they open correctly in the default application - Preview.
    Get info would show the same incorrect icon, but correctly show Preview as the default application.
    Just now I tried clicking on CoverFlow view and when I went back to List view, the icons looked correct again.
    What type of system maintenance if any is needed to correct this issue? Note, these files continue to display correctly on my home iMac where these files are synced.
    AndrewML

    Thanks for the reply Baltwo.
    I followed your directions. After the restart the PDF icons were all displayed correctly.
    However, some .doc file icons were blank. Selected one, got info, set it to open with MSWord and then clicked "apply to all." Most, but not all now display the Word logo. Some remain blank, although get info reveals they are set to open with Word. Will another restart fix this or is there another suggestion?
    I will be away from this computer till Monday.
    AndrewML

  • StarOffice 8 CDE Icon and Document File Extension Associations

    I recently upgraded to Solaris 10 (5/08). With previous versions of Solaris, I installed StarOffice 7 from CD and it placed the nice little icon in the CDE desktop panel and it created StarOffice associations to all the typical office file extensions (ie. .doc, .xls, etc.). I would like to use the StarOffice 8 that is bundled with Solaris 10. Is there an installation step or some other way to automatically setup the CDE icon and the file extension associations?
    Thanks,
    Joe
    Edited by: jdulisse on Sep 19, 2008 11:45 AM

    I came across the same problem on windows XP SP2 machines.
    I created a registry key that forces the file associations as follows:
    Windows Registry Editor Version 5.00
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.doc\shell&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.doc\shell\open&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.doc\shell\open\command &#93;
    @="\"C:\\Program Files\\Sun\\StarOffice 8\\program\\soffice.exe\" \"%1\""
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xls\shell&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xls\shell\open&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xls\shell\open\command &#93;
    @="\"C:\\Program Files\\Sun\\StarOffice 8\\program\\soffice.exe\" \"%1\""
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ppt\shell&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ppt\shell\open&#93;
    &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ppt\shell\open\command &#93;
    @="\"C:\\Program Files\\Sun\\StarOffice 8\\program\\soffice.exe\" \"%1\""

  • Viewing the file extension in the tphoto humbnails preview

    The file names have the file extensions cut off. Is it possible to view the file with the extension. I need to know if I'm looking at a .jpg or a .nef file (raw file) I tried the preferences and there are choices but none show the extension. I did notice that if your over an image a pop up window appears that shows the entire file name with extension....but I need it on the photo thumbnail. Thanks!

    If I had more time I would give you the short answer but you can find out how to do this and much more in an article that I wrote here:
    http://www.rwboyer.com/RBDesign/Blog/Entries/2008/8/11_Aperture_and_MetadataDisplay.html
    RB

Maybe you are looking for