I made a tweak for Cydia. However, I want to make my dylib secure and can't be overwritten by "dpkg-repack". And ensure that if it got repacked by someone, it should detect it and stop the process/can't do anything.
I have some knowledge about Objective C; however, I cannot find anything related to it.
For example,
Deb have "test.dylib". Other person made a deb with dpkg-repack and named it "test1.dylib".
Installing it, test is working in background but it looked like test1 is doing all of the work.
Related
I'm working to define a Docker container which can be spun up in a cloud environment and run some reporting on our firm's database and spin itself down, with as little involvement from our data science team (including myself) as possible.
I'm pretty much done getting everything up and running, with one irritating exception- the reporting is done in R using some code that we've been using for a few years. I'm building on top of Rocker verse, and I'm adding the needs library.
The annoying thing (in this use case) about needs is that when it is first run, it asks the following:
>library('needs')
Should `needs` load itself when it's... needed? (this is recommended)
1: No
2: Yes
Selection:
In a typical interactive setting this is fine, I just type "Yes" and hit enter and I'm good to go. However, when I want the whole environment to build and run once a week on its own, I don't want to have to answer this question. I'd like it to assume Yes.
What I've tried so far includes each of these:
library('needs', quiet=TRUE)
library('needs', quietly=TRUE)
suppressMessages(library('needs', quietly=TRUE))
suppressWarnings(suppressMessages(library('needs', quietly = T)))
suppressPackageStartupMessages(library('needs', quietly=TRUE))
none of which solves the issue. The needs documentation provides for changing this setting later in a programmatic way, but not for defining the setting when first running needs:
Recommended use is to allow the function to autoload when prompted the
first time the package is loaded interactively. To change this setting
later, run needs:::autoload(TRUE) or needs:::autoload(FALSE) to turn
autoloading on or off, respectively.
I've also tried quietly installing needs, also to no avail. Unfortunately, I can't run bash commands in my Dockerfile to respond Yes, or at least I haven't found a way.
I'd like to avoid removing dependencies for needs, as it will involve a LOT of code refactoring.
Any ideas on how to solve this?
Thank you! :]
-Vince
Update
Solution is a bit hacky, but in my Dockerfile I'm doing a vim edit of the file which needs assigns to the sysfile variable:
sysfile <- system.file("extdata", "promptUser", package = "needs")
which for ME was /usr/local/lib/R/site-library/needs/extdata/promptUser, and changing its contents from "1" to "0" solving my problem.
A better solution would probably be to make it so it doesn't ask the question in the first place. You can view the code it runs on package load on github: https://github.com/cran/needs/blob/master/R/needs-package.R
If you set the option it checks for before hand then it doesn't need to ask the question in the first place:
options(needs.promptUser = FALSE)
My Octave crashes when I execute plot command. I found a solution in Assad Ebrahim's answer. He mentioned to switch the default toolkit to gnuplot, and change it in octave.rc file if I want to make the change permanently but I'm not clear about the permanent change in octaverc. When I open my octaverc with notepad++, it looks like this:
## System-wide startup file for Octave.
##
## This file should contain any commands that should be executed each
## time Octave starts for every user at this site.
EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'notepad++'), pathsep,
EXEC_PATH));
EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'bin'), pathsep, EXEC_PATH));
EDITOR (fullfile (OCTAVE_HOME, 'notepad++', 'notepad++.exe'));
What should I change and how?
First, the direct answer to your question is to append any command you want executed on startup to the end of the .octaverc file. So, to set a particular graphics toolkit you would add the line:
graphics_toolkit("gnuplot")
Or
graphics_toolkit("qt")
Or
graphics_toolkit("fltk")
For whichever toolkit you want.
Now, as pointed out by #Andy, if you are using Windows, it may be that you are misinterpreting a long delay for a crash. A still not entirely resolved windows bug concerns the fact that on the first plot Windows might need to create a font cache file. This can take a long time. Once this is complete, most subsequent plots will be much faster. Some info can be found about it at the following bug report page:
https://savannah.gnu.org/bugs/?45458
EDIT: in the time since this answer was posted, the bug linked above has been largely resolved. Part of the installation process now updates the font-cache file. If using a zip package rather than an executable installer, there is a batch file that should be run after extracting octave to ensure that this is done. Details are available at:
http://wiki.octave.org/Octave_for_Microsoft_Windows
I have two different images which use a lot of common packages. One of them is the wpa-supplicant, which provides a file wpa_supplicant.conf installed by the default recipe. However, I want my own wpa_supplicant.conf to be installed.
I have this solved by having a .bbappend in my layer. But now I only want this append to be applied when I compile one of the images, but not the other.
In short: is there a way to enable/disable a .bbappend depending on the image compiled?
NOTES:
I have seen this answer which is similar, but creating a new package that install my file does not work: many packages will try to install the same file and Bitbake returns error.
The error here is that I cannot install the same file from two different packages, that's why this is not a duplicate of this question IMO.
Thanks!
Well, just as is stated in the answer that you link to, you can't have the image influence any other recipe. The reason is that each recipe is built indepent of which image you're building.
Are the different images intended to be installed onto the same MACHINE? Otherwise you could have different wpa_supplicant.conf for each MACHINE.
For the same MACHINE:
Using ROOTFS_POSTPROCESS_COMMAND is one way to solve this
Add both wpa_supplicant.conf-files (with differing names) andadd a pkg_post_inst_${PN}(){xxx} script to your wpa-supplicant, that during rootfs-creation time, detects which image is being built, and selects the corretct wpa_supplicant.conf.
Another solution is remove wpa_supplicant.conf from the wpa-supplicant package in your bbappend. Create two new packages wpa-supplicant-conf1 and wpa-supplicant-conf2, which just includes the respective wpa_supplicant.conf. Those two should ideally have a
wpa-supplicant-conf1:
RCONFLICTS_${PN} = "wpa-supplicant-conf2"
and for wpa-supplicant-conf2
RCONFLICTS_${PN} = "wpa-supplicant-conf1"
in their recipes.
I'm trying to get package references resolved during a build, using GNAT Programming Suite (hosted on Win XP). In the Builder Results, I get errors like this one:
file "ac_configuration_s.ada" not found
Clicking on the error takes me to a line like this:
with
Ac_Configuration,
Dispense_Timer,
...
The first item (Ac_Configuration) isn't resolved, but the second item (Dispense_Time) is resolved. I have several others that do or don't resolve. All of the files in question (spec and body) are identified as source files.
When I hover my mouse over the line with the error, a popup shows up that offers this:
(Cross-references info not up to date. This is a guess.)
Ac_Configuration
local package declared at D_Ac_Config_S.Ada:85
The guess is correct, but I don't know how to use this. How do I get this to correctly build?
Update
Here is teh call to gcc
gcc -c "-gnatec=C:\Source\build\GNAT-TEMP-000001.TMP" -I- -gnatA
-x ada "-gnatem=C:\Source\build\GNAT-TEMP-000002.TMP" "C:\Source\C_Cbt_Main_B.Ada"
I don't see a reference to teh "miimal" switch.
In this case, there is no corresponding body file file D_Ac_Config_S.Ada. So the is no body file to compile separately.
When I right click on the package reference inside the with, I can goto the declaration of Ac_Configuration and every other package name that is the source of an error. So these lreferences are being resolved somehow.
By the way, I have not used ADA before, so I'm still trying to understand everything.
It looks as though you're using _s.ada as the suffix for specs, and I'm guessing _b.ada for bodies?
GNAT may have difficulty with this naming convention. It's possible, using a GNAT Project file (.gpr), to alter GNAT's default convention ({unit-name}.ads for specs, {unit-name}.adb for bodies) but the rules (see "Spec_Suffix") say "It cannot start with an underscore followed by an alphanumeric character" (I haven't tried this, but you can see that it would confuse the issue if you had a package Foo_S, for example).
LATER: It turns out that GNAT (GPL, 4.7, 4.8) is quite happy with your suffixes!
If the package Ac_Configuration is really a local package declared at line 85 of D_Ac_Config_S.Ada, then there's your problem; you can only with a library unit, which in this case would be D_Ac_Config.
with D_Ac_Config;
...
package Foo is
...
Bar : D_Ac_Config.Ac_Configuration.Baz;
I wonder whether D_Ac_Config_S.Ada (for example) actually contains multiple Ada units? (if so, compiling that file should result in a compilation error such as end of file expected, file can have only one compilation unit). GNAT doesn't support this at compile time, providing instead a utility gnatchop.
Would it be possible to just gnatchop all the source and be done with it?
Hm, I think it sounds like the compiler's got a bad set of objects/ALIs it's working with, hence the cross-reference not up to date error. (Usually the compiler's good about keeping things up to date; but you may want to check to see if the "minimal recompilation" switch is set for the project.)
Have you tried compiling just the ["owning"] file D_Ac_Config_S.Ada? (i.e. if it were a spec, go to the corresponding body and compile that.) That should force its ALI/object files to be updated.
Then try building as normal.
-- PS: you might have to clean first.
My paths and files are as follows ...
E:R/R-2.15.1/library/Rcmdr/
E:R/R-2.15.1/library/RcmdrPlugin.Package/
E:R/R-2.15.1/MyLibrary/RcmdrPlugin.Package.zip
E:R/R-2.15.1/MyLibrary/RcmdrPlugin.Package/
where, in the name RcmdrPlugin.Package, I've used the word 'Package' to represent the name of the actual package being used.
The installation is as described above because (i) I'm not an expert at installing packages, (ii) I couldn't do a direct install from Cran because I wanted to put the package onto a USB stick; and, (iii) at work the Cran server is blocked (sic).
When I start the package from the GUI the Cmdr opens once and quickly closes (I don't know if this is relevant or normal) and opens again. Once open, I can operate the package via the Cmdr interface. It's a very nice package, everything works really well until I want to save the work. Then I get the following error,
Error in obj[i] : object of type 'closure' is not subsettable
I've been in contact with the people who developed (and are still developing) the package and they cannot reproduce the bug.
I strongly suspect that the problem lies in my 'crappy' install and file configuration, rather than with the package.
Can anyone please help me by suggesting how I would undo what I've done and do it properly in view of the constraints list above?
I appreciate that I can use Remove to get rid of the package but I don't want to start tinkering with something without having a greater understanding of what I'm doing.
Lastly, note that is error has been discussed a number of times on this list but not within this particular context.
I've managed to get it to work by following the instructions from here stackoverflow.com/questions/12820189/… where I set repos=NULL after I'd put the package into /MyLibrary/